-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[FLINK-37120][cdc-connector] Add ending split chunk first to avoid TaskManager oom #3856
Conversation
CI:https://github.com/beryllw/flink-cdc/actions/runs/12779452404 |
Adding the ending split chunk first changes the snapshot read result order. I will fix the unit test. |
THanks @beryllw for the contribution, the idea makes sense to me, but we need to consider the compatibility, a configuration is recommended |
If data consistency is not an issue, are there any compatibility concerns we need to address? |
...a/org/apache/flink/cdc/connectors/base/source/assigner/splitter/JdbcSourceChunkSplitter.java
Show resolved
Hide resolved
What‘s more, could you add this optimization to |
Sure, i will check MongoDBChunkSplitter. |
1004386
to
9a7ed71
Compare
I overlooked this issue #3704, good idea. Maybe support |
My previous PR provided both I think if there is no impact on restarting from the previous state, there is no compatibility issue, but adding a parameter to control it would be safer. |
...ysql/src/main/java/org/apache/flink/cdc/connectors/mysql/factory/MySqlDataSourceFactory.java
Outdated
Show resolved
Hide resolved
I think adding a test in MySqlSourceITCase to test the case of restoring from failure will be better. |
agree. |
LGTM. |
What about |
@leonardBang @lvyanquan PTAL |
Thanks @beryllw for this update, since you've added this feature to jdbc common module, it seems like that this config option was not added in DynamicTableSourceFactory and was not passed to Source. |
https://github.com/beryllw/flink-cdc/actions/runs/13258656371?pr=7 |
...l-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/table/MySqlTableSourceFactory.java
Show resolved
Hide resolved
39bd7b3
to
53471ca
Compare
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 @beryllw for this contribution and it looks good to me.
I think you can create one jira to make the default value of this option to true
after one or two major versions and testing in product environment.
And you might need to do some rebase to fix the ci failure. |
Sure. |
632e90a
to
6dc28a9
Compare
https://github.com/beryllw/flink-cdc/actions/runs/13387743918 |
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 @beryllw for the contribution, I left two comments
...a/org/apache/flink/cdc/connectors/base/source/assigner/splitter/JdbcSourceChunkSplitter.java
Show resolved
Hide resolved
...mysql/src/main/java/org/apache/flink/cdc/connectors/mysql/source/MySqlDataSourceOptions.java
Outdated
Show resolved
Hide resolved
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 @beryllw for the great work, LGTM
Hi, @beryllw. Could you check the failed cases? If some are unrelated to the change, please add some description. |
Looks like unrelated to this change, here is the CI beryllw#7, and I also manually tested the failed tests(except for MySqlConnectorITCase). |
@leonardBang Is there anything else that needs to be completed? I'm concerned about potential conflicts later on.Could you please help me move this forward? |
Hey, @beryllw Thank you for your reminder, I'll help investigate the failure case and merge your PR. |
I guess the failed test cases in |
Sure, I will recheck the failed test cases in |
… buffering too much data
6ee1636
to
a83cebb
Compare
Rebase this PR to master to obtain fixed patches, let's see what happens next @beryllw |
CI passed, merging.... |
Sorry, I've been too busy to check earlier. Thanks for your help. |
…nded splits firstly to avoid buffering too much data This closes apache#3856.
…nded splits firstly to avoid buffering too much data This closes apache#3856.
Add ending split chunk first to avoid TaskManager oom