KAFKA-12177: apply log start offset retention before time and size based retention#10216
Merged
junrao merged 4 commits intoapache:trunkfrom Mar 2, 2021
Merged
KAFKA-12177: apply log start offset retention before time and size based retention#10216junrao merged 4 commits intoapache:trunkfrom
junrao merged 4 commits intoapache:trunkfrom
Conversation
Contributor
Author
|
@junrao, could you please give this a look when you get a chance? |
satishd
approved these changes
Feb 26, 2021
Member
satishd
left a comment
There was a problem hiding this comment.
Nice catch @lbradstreet . +1.
junrao
reviewed
Mar 1, 2021
Contributor
junrao
left a comment
There was a problem hiding this comment.
@lbradstreet : Thanks for the PR. Just a minor comment below.
| log.maybeIncrementLogStartOffset(1L, ClientRecordDeletion) | ||
| assertEquals(2, log.deleteOldSegments(), | ||
| "Expecting two segment deletions as log start offset retention should unblock time based retention") | ||
| //assertEquals(0, log.deleteOldSegments()) |
junrao
approved these changes
Mar 2, 2021
Contributor
junrao
left a comment
There was a problem hiding this comment.
@lbradstreet : Thanks for the PR. LGTM
ijuma
added a commit
to ijuma/kafka
that referenced
this pull request
Mar 3, 2021
* apache-github/trunk: KAFKA-12400: Upgrade jetty to fix CVE-2020-27223 MINOR: Fix null exception in coordinator log (apache#10250) y KAFKA-12375: don't reuse thread.id until a thread has fully shut down (apache#10215) KAFKA-12177: apply log start offset retention before time and size based retention (apache#10216) KAFKA-12369; Implement `ListTransactions` API (apache#10206)
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.
Log start offset retention is the cheapest retention to evaluate and does not require access to maxTimestamp fields for segments, nor segment sizes. In addition, it may unblock other types of retention such as time based retention. Without this change retention is not idempotent. It's possible for one deleteOldSegments call to delete segments due to log start offset retention, and a follow up call to delete due to time based retention, even if the time has not changed.