-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][cdc-base] fix cdc bug #1339
Conversation
@@ -83,4 +84,6 @@ public SchemaNameAdjuster getSchemaNameAdjuster() { | |||
public abstract ChangeEventQueue<DataChangeEvent> getQueue(); | |||
|
|||
public abstract Offset getStreamOffset(SourceRecord sourceRecord); | |||
|
|||
public abstract RelationalTableFilters getRelationalTableFilters(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this new method is not relational to this bug.
@@ -79,7 +79,9 @@ public JdbcSourceStreamFetcher(JdbcSourceFetchTaskContext taskContext, int subTa | |||
public void submitTask(FetchTask<SourceSplitBase> fetchTask) { | |||
this.streamFetchTask = fetchTask; | |||
this.currentStreamSplit = fetchTask.getSplit().asStreamSplit(); | |||
configureFilter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think invoking this method is enough to fix this bug. Why do we need other modifies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just invoke this method and have solved that problem by retesting it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change of [JdbcSourceStreamFetcher.java] is enough for the fix
@@ -79,7 +79,9 @@ public JdbcSourceStreamFetcher(JdbcSourceFetchTaskContext taskContext, int subTa | |||
public void submitTask(FetchTask<SourceSplitBase> fetchTask) { | |||
this.streamFetchTask = fetchTask; | |||
this.currentStreamSplit = fetchTask.getSplit().asStreamSplit(); | |||
configureFilter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just invoke this method and have solved that problem by retesting it
@@ -113,6 +113,7 @@ public Iterator<SourceRecord> pollSplitRecords() throws InterruptedException { | |||
boolean reachBinlogEnd = false; | |||
final List<SourceRecord> sourceRecords = new ArrayList<>(); | |||
while (!reachBinlogEnd) { | |||
checkReadException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it solves the problem #1098. It is better that add a test for JdbcSourceScanFetcher.java like com.ververica.cdc.connectors.mysql.debezium.reader.SnapshotSplitReaderTest#testThrowRuntimeExceptionInSnapshotScan
@Override | ||
public RelationalTableFilters getRelationalTableFilters() { | ||
return getDbzConnectorConfig().getTableFilters(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this new method is not relational to this bug.
fix: #1122 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fuyun2024 and @molsionmo for the contribution, sorry for the late reply, LGTM.
issues : issues-1122