-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[mysql-cdc] Fix the hung up of snapshot phase when reuse binaryLogClient #1915
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
Conversation
|
@leonardBang @kylemeow @minchowang Would you help to look at this problem. |
|
We just encountered this problem online. The snapshot stage is stuck, and the problem is solved after this repair. @minchowang |
|
Thanks @lzshlzsh for the detail report and fix! I'll review this PR asap |
|
Hi @lzshlzsh, thanks for your contribution! Before this PR could be merged, could you please rebase it with latest |
|
This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs. |
|
This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs. |
|
This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs. |
|
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request. |
|
@yuxiqian need attention |
|
Hi Misaya, it seems the original author of this PR has been inactive for a long time, and this PR is way off HEAD branch and not ready for merge. Feel free to open another PR for this if it's still reproducible in the latest version. :) |
Because callback( eventListeners and lifecycleListeners) of BinaryLogClient is a list, and BinaryLogClient may reuse (see MySqlSplitReader#checkSplitOrStartNext),when multiple snapshotSplits are submitted to a SnapshotSplitReader, the callback list contains already processed snapshotSplits's MySqlBinlogSplitReadTask#handleEvent。When a binlog event arrives, the processed snapshot's callbacks are called and causes the current snapshot's BackfillBinlogReadTask's execute function end before get the BINLOG_END watermark event. So the snapshot phase hangs.
The following is the log of our online environment, we can see muliple MySqlStreamingChangeEventSource(super calss of MySqlBinlogSplitReadTask) callbacks of different snapshotSplits.
We believe, the imporper use of mysql BinlogClient is the root cause of some task hung up issues, such as #1156。