Skip to content
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

Merged
merged 1 commit into from
Aug 1, 2022
Merged

Conversation

fuyun2024
Copy link
Contributor

issues : issues-1122

@@ -83,4 +84,6 @@ public SchemaNameAdjuster getSchemaNameAdjuster() {
public abstract ChangeEventQueue<DataChangeEvent> getQueue();

public abstract Offset getStreamOffset(SourceRecord sourceRecord);

public abstract RelationalTableFilters getRelationalTableFilters();
Copy link
Contributor

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();
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor

@molsionmo molsionmo left a 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();
Copy link
Contributor

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();
Copy link
Contributor

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();
}
Copy link
Contributor

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.

@molsionmo
Copy link
Contributor

fix: #1122

Copy link
Contributor

@leonardBang leonardBang left a 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.

@leonardBang leonardBang merged commit 0a097a9 into apache:master Aug 1, 2022
@fuyun2024 fuyun2024 deleted the base-cdc-1122 branch October 19, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants