{{ message }}
Repository navigation
KAFKA-21317: Continue timestamp search across eligible log segments - #23880
Open
shantanukawale-stripe wants to merge 1 commit into
Open
shantanukawale-stripe wants to merge 1 commit into
shantanukawale-stripe wants to merge 1 commit into
Conversation
After the log start offset advances into a segment, an expired record can leave that segment eligible by timestamp even though its retained records do not match. Continue into later eligible segments and skip wholly obsolete segments using the cached segment base offsets. Generated-by: OpenAI Codex (GPT-5)
Author
Author
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.

After the log start offset advances into a segment, its cached largest timestamp can come from a record below the new start offset. The per-segment timestamp lookup correctly returns empty when no retained record matches, but
UnifiedLogcurrently returns that empty result without checking later segments that may contain a valid match.Continue searching eligible segments until a lookup returns a result. Preserve the one-time segment snapshot and use in-memory base offsets to skip obsolete segments without reading segment tails. Add a file-backed, two-segment regression with non-monotonic timestamps and a log start offset inside the first segment.
Jira: https://issues.apache.org/jira/browse/KAFKA-21317