Skip to content

[minor][pipeline-connector/sqlserver] Fix SQL Server schema restore without per-record JDBC#4446

Open
leonardBang wants to merge 3 commits into
apache:masterfrom
leonardBang:sqlserver_optimize
Open

[minor][pipeline-connector/sqlserver] Fix SQL Server schema restore without per-record JDBC#4446
leonardBang wants to merge 3 commits into
apache:masterfrom
leonardBang:sqlserver_optimize

Conversation

@leonardBang

Copy link
Copy Markdown
Contributor

Restore CreateTableEvent state from source splits during reader initialization so savepoint recovery does not fall back to per-record JDBC lookups.

…ithout per-record JDBC

Restore CreateTableEvent state from source splits during reader initialization so savepoint recovery does not fall back to per-record JDBC lookups.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@leonardBang

Copy link
Copy Markdown
Contributor Author

@Daishuyuan Would you like to review this PR when you have time?

@leonardBang leonardBang changed the title [drfat] [minor][pipeline-connector/sqlserver] Fix SQL Server schema restore without per-record JDBC [minor][pipeline-connector/sqlserver] Fix SQL Server schema restore without per-record JDBC Jun 23, 2026
@leonardBang leonardBang requested a review from Copilot June 24, 2026 02:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures SQL Server pipeline schema state (CreateTableEvent cache) is restored from split state during reader initialization, preventing savepoint restores from degrading into JDBC-based schema lookups during record emission.

Changes:

  • Invoke IncrementalSourceRecordEmitter.applySplit(...) during IncrementalSourceReader.initializedState(...) to let emitters hydrate per-split state early.
  • Add a focused unit test verifying initializedState(...) applies the split to the record emitter.
  • Add an end-to-end SQL Server pipeline IT case covering schema evolution continuity across savepoint/restore.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.../IncrementalSourceReaderTest.java New unit test validating split application to the record emitter during initialization.
.../IncrementalSourceReader.java Applies the split to IncrementalSourceRecordEmitter during split-state initialization.
.../SqlServerPipelineSavepointRestoreITCase.java New SQL Server savepoint/restore IT verifying schema evolution continues after restore.
.../SqlServerPipelineRecordEmitter.java Restores CreateTableEvent cache from split schemas and changes cache-miss behavior while emitting CreateTableEvent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@leonardBang leonardBang requested a review from ruanhang1993 June 25, 2026 08:07
@leonardBang

Copy link
Copy Markdown
Contributor Author

@ruanhang1993 Would you like to help review this PR when you have time ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants