-
Notifications
You must be signed in to change notification settings - Fork 589
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
archival: clamp uploads to committed offset #18285
Merged
piyushredpanda
merged 3 commits into
redpanda-data:dev
from
nvartolomei:nv/clamp-upload-to-committed-offset
May 10, 2024
Merged
archival: clamp uploads to committed offset #18285
piyushredpanda
merged 3 commits into
redpanda-data:dev
from
nvartolomei:nv/clamp-upload-to-committed-offset
May 10, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nvartolomei
force-pushed
the
nv/clamp-upload-to-committed-offset
branch
from
May 7, 2024 16:58
007eea8
to
63aff06
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Lazin
reviewed
May 7, 2024
andrwng
previously approved these changes
May 7, 2024
abhijat
reviewed
May 8, 2024
abhijat
previously approved these changes
May 8, 2024
Lazin
previously approved these changes
May 8, 2024
The archival/tiered storage correctness assumption builds on the (wrong) assumption that LSO is monotonic. Tiered storage doesn't have a concept of suffix truncation so if that would happen it would lead violations of correctness properties and diverging logs/undefined behavior. However, we have discovered that property does not hold if there are no in-progress transaction and acks=0/1 or write caching is in use because LSO falls back to "last visible index"[^1] which can get truncated. Ref redpanda-data#18244 [^1]: https://github.com/redpanda-data/redpanda/blob/88ac775f9f7954330732024abfa6e9ed5c9c11fd/src/v/cluster/rm_stm.cc#L1322
This communicates better the type of offset. No functional changes/cosmetic only.
Outrageously verbose but for a good reason.
nvartolomei
force-pushed
the
nv/clamp-upload-to-committed-offset
branch
from
May 8, 2024 21:30
63aff06
to
15ac281
Compare
At the risk of being too verbose I have updated the code based on the suggestions from the code review. It is less convoluted now albeit at the expense on some longer words. |
Lazin
approved these changes
May 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect
/backport v24.1.x |
/backport v23.3.x |
This was referenced May 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The archival/tiered storage correctness assumption builds on the (wrong) assumption that LSO is monotonic. Tiered storage doesn't have a concept of suffix truncation so if that would happen it would lead violations of correctness properties and diverging logs/undefined behavior.
However, we have discovered that property does not hold if there are no in-progress transaction and acks=0/1 or write caching is in use because LSO falls back to "last visible index"1 which can get truncated.
Ref #18244
Backports Required
Release Notes
Footnotes
https://github.com/redpanda-data/redpanda/blob/88ac775f9f7954330732024abfa6e9ed5c9c11fd/src/v/cluster/rm_stm.cc#L1322 ↩