Skip to content

kafka connect: coordinator only commits offsets when greater than existing offsets - #17552

Open
twthorn wants to merge 1 commit into
apache:mainfrom
twthorn:kafka-connect-coordinator-monotonic-offset-commit
Open

kafka connect: coordinator only commits offsets when greater than existing offsets#17552
twthorn wants to merge 1 commit into
apache:mainfrom
twthorn:kafka-connect-coordinator-monotonic-offset-commit

Conversation

@twthorn

@twthorn twthorn commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #17551

More context in that ticket on the exact sequence of events.

Overall, it's possible multiple coordinators exist, and one may commit old/stale offsets still in memory, which may be out of retention, and this sequence will cause data loss.

We do a check before writing the offset.

Note: it is possible that a race condition exists (eg coordinator A reads offset n, coordinator B reads offset n & commits offset n+2, and then coordinator A commits offset n+1). However, the committed offset still never drops below n, so the worst case is reprocessing a few records (ie duplicates), not data loss.

Also add some logging that makes these scenarios much more clear (eg when a stale coordinator may exist, what the coordinators offsets are that they are committing).

…sting offsets

Signed-off-by: Thomas Thornton <thomaswilliamthornton@gmail.com>
@twthorn

twthorn commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@laskoviymishka think you could take a look when you get a free moment? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kafka connect: data loss with default configs due to persistent zombie coordinators

1 participant