-
Notifications
You must be signed in to change notification settings - Fork 32
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 unable to capture changes while concurrent writes #36
Conversation
Do we need to have a retry interval too? Can’t it just be the polling interval |
Yes, we can have the polling interval as the retry interval. The intention to introduce the retry interval was to reduce the waiting time and resume the process as quickly as possible. |
} | ||
Thread.sleep((long) pollingInterval * 1000); | ||
} catch (InterruptedException e) { | ||
log.error("Error while polling. Current mode: " + CDCSourceConstants.MODE_POLLING, e); |
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.
Please improve the errors with the stream and App name information... else it will be hard to troubleshoot. please fix this for all cases.
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.
Fixed in b221509.
Purpose
When concurrent/out-of-order writes for the auto-increment column occurs in the database, the source cannot capture such events in the polling mode.
Resolves #31
Goals
This PR introduces a strategy to handle such events by waiting on missing records.
Approach
When the
wait.on.missed.record
parameter is set totrue
, the source expectspolling.column
values in (numeric) sequential order. For each record, the source generates an event. When reading and processing records in batches, if the source identifies a missed record it pauses the processing and waits until the missing record appears. If the missing record does not appear formissed.record.waiting.timeout
time period (in seconds), it ignores the record and resumes processing the rest.Security checks