-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] [Mongo-cdc] Fallback to timestamp startup mode when resume token has expired #8754
base: dev
Are you sure you want to change the base?
Conversation
…ing with Elasticsearch's automatic index creation apache#7430
…utomatic index creation conflict apache#7430
…utomatically creating indexes based on templates apache#7430
…utomatic index creation conflict apache#7430
…utomatic index creation conflict apache#7430
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 @jw-itq , Do we have some way to add test case verify it?
ok, I'll give it a try. It might take some time. |
This PR also fixes the issue where MongoDB CDC fails to resume from the savepoint during restart recovery. |
Purpose of this pull request
Synchronize the Flink-CDC code to fix the Mongo-CDC issue.
When MongoDB CDC connector tries to create cursor with an expired resuming token during stream task fetching stage, it will crash with a fatal exception: error due to Command failed with error 280 (ChangeStreamFatalError): cannot resume stream; the resume token was not found.
This PR added fallback logic to create cursor with timestamp, which only runs when:
Mongo CDC is in StreamTaskFetch stage
a ChangeStreamFatalError (280) is raised
Current ChangeStreamOffset has a valid timestamp field
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.