MINOR: make LogCleaner.shouldRetainRecord more clear to read#6590
Merged
hachikuji merged 3 commits intoapache:trunkfrom Apr 25, 2019
Merged
MINOR: make LogCleaner.shouldRetainRecord more clear to read#6590hachikuji merged 3 commits intoapache:trunkfrom
hachikuji merged 3 commits intoapache:trunkfrom
Conversation
Contributor
Author
|
Call for review @cadonna @bbejeck @mjsax @vvcephei @guozhangwang |
Contributor
Author
|
Retest this,please |
Contributor
Author
|
JDK11 has one test failed: JDK 8 passed |
Member
|
Call for review anyof @hachikuji @gwenshap @bob-barrett @cmccabe |
bob-barrett
reviewed
Apr 20, 2019
bob-barrett
approved these changes
Apr 22, 2019
Contributor
bob-barrett
left a comment
There was a problem hiding this comment.
LGTM, thanks for the patch
hachikuji
reviewed
Apr 25, 2019
hachikuji
approved these changes
Apr 25, 2019
Contributor
hachikuji
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the patch!
dhruvilshah3
added a commit
to confluentinc/kafka
that referenced
this pull request
Apr 29, 2019
* ak/trunk: (42 commits) KAFKA-8134: `linger.ms` must be a long KAFKA-7779; Avoid unnecessary loop iteration in leastLoadedNode (apache#6081) MINOR: Update Gradle to 5.4.1 and update its plugins (apache#6436) MINOR: improve Session expiration notice (apache#6618) KAFKA-8029: In memory session store (apache#6525) MINOR: In-memory stores cleanup (apache#6595) KAFKA-7862 & KIP-345 part-one: Add static membership logic to JoinGroup protocol (apache#6177) KAFKA-8254: Pass Changelog as Topic in Suppress Serdes (apache#6602) KAFKA-7903: automatically generate OffsetCommitRequest (apache#6583) KAFKA-8291 : System test fix (apache#6637) MINOR: Do not log retriable offset commit exceptions as errors (apache#5904) MINOR: Fix log message error of loadTransactionMetadata (apache#6571) MINOR: Fix 404 security features links (apache#6634) MINOR: Remove an unnecessary character from broker's startup log MINOR: Make LogCleaner.shouldRetainRecord more readable (apache#6590) MINOR: Remove implicit return statement (apache#6629) KAFKA-8237; Untangle TopicDeleteManager and add test cases (apache#6588) KAFKA-8227 DOCS Fixed missing links duality of streams tables (apache#6625) MINOR: reformat settings.gradle to be more readable (apache#6621) MINOR: Correct RestServerTest formatting ... Conflicts: build.gradle settings.gradle
pengxiaolong
pushed a commit
to pengxiaolong/kafka
that referenced
this pull request
Jun 14, 2019
Reviewers: Bob Barrett <bob.barrett@outlook.com>, Jason Gustafson <jason@confluent.io>
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.
The comments of LogCleaner.shouldRetainRecord are pretty clear to tell us when to retain a record.
However, I think the code is not so clear as the comments so that i make some changes:
val redundant = foundOffset >= 0 && record.offset < foundOffset--->
val latest= foundOffset < 0 || record.offset >= foundOffsetif there dose not exist a message with the key, foundOffset will be -1, record.offset is larger than -1:
val latest = record.offset() >= foundOffset