DBZ-7628 Use COMMIT time for events, not BEGIN time #184
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were using BEGIN timestamp for events. This does not match the docs which state that ts_ms is the time that the change is applied to the database. This is also inconsistent with other connectors.
We add tests to reproduce the issue of using BEGIN timestamp. Then adjust the functionality to support using COMMIT timestamp instead.
One key part of the correctness of this code is that a the response.getEventsList() will only ever contain 1 transaction or a partial transaction. It will never contain two transactions (this is why we do not need to buffer/store multiple commit timestamps). We know this is the case by the commit validation in the codebase, ie that if another commit is ever received in a response.getEventsList() then we throw an exception.