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.
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
KAFKA-16452: Don't throw OOORE when converting the offset to metadata #15825
KAFKA-16452: Don't throw OOORE when converting the offset to metadata #15825
Changes from 25 commits
33bf18b
5fc04f6
9143e45
5345bd3
d23f426
a4e31e0
afca50e
ff3ab0e
5945dec
9f22047
f26d381
14efe65
503732a
06ee554
56604d6
ce09bcd
7e97904
eb75573
f5ce2a6
6e3f113
7ce211e
5d080ad
34d8ca0
59e6a7b
21a6d27
91bd96b
d4668be
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Could we fold this into the condition above?
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.
Not clear on this one. The current
if
checks are easy to read, we can add one debug log to avoid the emptyif
block.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.
With the latest changes in LogOffsetMetadata, it seems we only have to add one check in DelayedFetch.scala#106 compared to trunk, that would suffice:
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.
Yes, since
onOlderSegment()
andonSameSegment()
do themessageOffsetOnly()
check already. We could just get rid of this condition.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.
Hmm, in both cases, we are not forcing the completion of the delayed fetch, right?
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.
when fetchOffset > endOffset,
forceComplete
gets called. In this case. 450 > 0, so it triggers force completion.This is the only behavior change post the refactor. Previously when fetchOffset > endOffset:
We can retain the same behavior if required.
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.
Got it. We won't complete when
endOffset
is 500 because it doesn't contain offset metadata. But this is not the normal case. So, we want to adjust "it refers to the normal case" accordingly.