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

fix: runlength decoding after no-progress commit #563

Merged
merged 1 commit into from
Mar 8, 2023
Merged

fix: runlength decoding after no-progress commit #563

merged 1 commit into from
Mar 8, 2023

Conversation

rkolesnev
Copy link
Member

@rkolesnev rkolesnev commented Mar 3, 2023

When offset data is serialized using RunLength encoder - and base offset to commit is same as the next expected offset - 1 (or lower) - basically there is no extended metadata to encode - could be caused by slow processing (slower than consumption) or on rebalance etc.

When that data is subsequently decoded - the HighestOffset is returned as 0 - that causes the warning about state truncation to be shown and the bootstrap state truncation logic to be invoked.

This fix addresses the decoding side - initializing the HighestOffset = baseOffset-1 - same as bitset decoder, but potentially we could detect and skip encoding of metadata in those scenarios - need to dig deeper and can be done as follow up.

Related issue #546

Checklist

  • Documentation (if applicable)
  • Changelog

@rkolesnev rkolesnev requested a review from nachomdo March 3, 2023 19:18
Copy link
Contributor

@nachomdo nachomdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@johnbyrnejb johnbyrnejb merged commit 857c384 into confluentinc:master Mar 8, 2023
@rkolesnev rkolesnev mentioned this pull request May 8, 2023
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.

3 participants