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

partition table: always store offset #337

Merged
merged 1 commit into from
Jul 8, 2021
Merged

Conversation

frairon
Copy link
Contributor

@frairon frairon commented Jul 8, 2021

This PR removes the functionality of "store only newest offest" in the partition table during SetValue().

The idea of this limitation was to make sure we don't overwrite new partition-offsets with old values. However, a side effect was that if the offset was somehow corruped and higher than the actual offset, it would never get fixed.

The function was actually never necessary, because

  • SetValues() are executed sequentially per partition
  • --> the producer-emits are also pushed sequentially to the channel
  • --> the offset-results will also be in order (i.e. monotonically increasing). The PR adds a system test to verify this.

This should also reduce some load from the storage, since it removes the extra GetOffset on every SetValue.

@frairon frairon merged commit e51ca79 into master Jul 8, 2021
@frairon frairon deleted the always-store-offset branch July 8, 2021 12:00
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.

None yet

2 participants