KAFKA-15241: Compute tiered copied offset by keeping the respective epochs in scope#14787
Merged
Conversation
kamalcph
commented
Nov 17, 2023
Contributor
Author
There was a problem hiding this comment.
After broker restart, if there are no more segments to upload, then the copiedOffset might be stale. It's good to update the highestOffsetInRemoteStorage in the UnifiedLog once we compute it.
Contributor
|
I will aim to provide a review today! |
clolov
approved these changes
Nov 20, 2023
clolov
left a comment
Contributor
There was a problem hiding this comment.
On a first read the change makes sense to me barring the few small comments
…pochs in scope. findHighestRemoteOffset does not take into account the leader-epoch end offset. This can cause log divergence between the local and remote log segments when there is unclean leader election. To handle it correctly, the logic to find the highest remote offset can be updated to: find-highest-remote-offset = min(end-offset-for-epoch-in-the-checkpoint, highest-remote-offset-for-epoch) Discussion thread: apache#14004 (comment)
kamalcph
force-pushed
the
KAFKA-15241
branch
from
November 20, 2023 16:08
07b39b9 to
90a69e5
Compare
satishd
reviewed
Nov 21, 2023
Contributor
Author
|
Addressed your review comments. PTAL. |
Member
|
Test failures in jenkins jobs are unrelated to this change, merging it to trunk. |
yyu1993
pushed a commit
to yyu1993/kafka
that referenced
this pull request
Feb 15, 2024
…pochs in scope (apache#14787) "findHighestRemoteOffset" does not take into account the leader-epoch end offset. This can cause log divergence between the local and remote log segments when there is unclean leader election. To handle it correctly, the logic to find the highest remote offset can be updated to: find-highest-remote-offset = min(end-offset-for-epoch-in-the-checkpoint, highest-remote-offset-for-epoch) Discussion thread: apache#14004 (comment) Reviewers: Satish Duggana <satishd@apache.org>, Christo Lolov <lolovc@amazon.com>
AnatolyPopov
pushed a commit
to aiven/kafka
that referenced
this pull request
Feb 16, 2024
…pochs in scope (apache#14787) "findHighestRemoteOffset" does not take into account the leader-epoch end offset. This can cause log divergence between the local and remote log segments when there is unclean leader election. To handle it correctly, the logic to find the highest remote offset can be updated to: find-highest-remote-offset = min(end-offset-for-epoch-in-the-checkpoint, highest-remote-offset-for-epoch) Discussion thread: apache#14004 (comment) Reviewers: Satish Duggana <satishd@apache.org>, Christo Lolov <lolovc@amazon.com>
clolov
pushed a commit
to clolov/kafka
that referenced
this pull request
Apr 5, 2024
…pochs in scope (apache#14787) "findHighestRemoteOffset" does not take into account the leader-epoch end offset. This can cause log divergence between the local and remote log segments when there is unclean leader election. To handle it correctly, the logic to find the highest remote offset can be updated to: find-highest-remote-offset = min(end-offset-for-epoch-in-the-checkpoint, highest-remote-offset-for-epoch) Discussion thread: apache#14004 (comment) Reviewers: Satish Duggana <satishd@apache.org>, Christo Lolov <lolovc@amazon.com>
This file contains hidden or 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
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.
findHighestRemoteOffsetdoes not take into account the leader-epoch end offset. This can cause log divergence between the local and remote log segments when there is unclean leader election.To handle it correctly, the logic to find the highest remote offset can be updated to:
Discussion thread: #14004 (comment)
Committer Checklist (excluded from commit message)