Skip to content
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

DBZ-7628 Use COMMIT time for events, not BEGIN time #184

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

twthorn
Copy link
Contributor

@twthorn twthorn commented Mar 11, 2024

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.

@jpechane jpechane merged commit fc07915 into debezium:main Mar 14, 2024
3 checks passed
@jpechane
Copy link
Contributor

@twthorn Applied, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants