KAFKA-7692: Fix ProduceStateManager SequenceNumber overflow.#5990
Merged
hachikuji merged 6 commits intoapache:trunkfrom Jan 25, 2019
Merged
KAFKA-7692: Fix ProduceStateManager SequenceNumber overflow.#5990hachikuji merged 6 commits intoapache:trunkfrom
hachikuji merged 6 commits intoapache:trunkfrom
Conversation
Member
|
Cc @hachikuji |
hachikuji
reviewed
Dec 13, 2018
Contributor
hachikuji
left a comment
There was a problem hiding this comment.
Thanks for the PR. The fix looks good. It would be helpful to have a test case while overflows the sequence number.
Contributor
Author
|
@hachikuji Thanks for the comments. I updated the PR with unitest. |
Merged
3 tasks
Contributor
Author
|
Tested multiple times and succeed locally, the jenkins is due to other random test failure. @hachikuji , please review. Thanks! |
Contributor
Author
|
Please review or sign off, @junrao , @hachikuji , thanks! |
hachikuji
approved these changes
Jan 25, 2019
Contributor
hachikuji
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the patch!
hachikuji
pushed a commit
that referenced
this pull request
Jan 25, 2019
This patch fixes a few overflow issues with wrapping sequence numbers in the broker's producer state tracking. Reviewers: Jason Gustafson <jason@confluent.io>
hachikuji
pushed a commit
that referenced
this pull request
Jan 25, 2019
This patch fixes a few overflow issues with wrapping sequence numbers in the broker's producer state tracking. Reviewers: Jason Gustafson <jason@confluent.io>
hachikuji
pushed a commit
that referenced
this pull request
Jan 25, 2019
This patch fixes a few overflow issues with wrapping sequence numbers in the broker's producer state tracking. Reviewers: Jason Gustafson <jason@confluent.io>
jarekr
pushed a commit
to confluentinc/kafka
that referenced
this pull request
Apr 18, 2019
* ak/trunk: MINOR: Update usage of deprecated API (apache#6146) KAFKA-4217: Add KStream.flatTransform (apache#5273) MINOR: Update Gradle to 5.1.1 (apache#6160) KAFKA-3522: Generalize Segments (apache#6170) Added quotes around the class path (apache#4469) KAFKA-7837: Ensure offline partitions are picked up as soon as possible when shrinking ISR (apache#6202) MINOR: In the MetadataResponse schema, ignorable should be a boolean KAFKA-7838: Log leader and follower end offsets when shrinking ISR (apache#6168) KAFKA-5692: Change PreferredReplicaLeaderElectionCommand to use Admin… (apache#3848) MINOR: clarify why suppress can sometimes drop tombstones (apache#6195) MINOR: Upgrade ducktape to 0.7.5 (apache#6197) MINOR: Improve IntegrationTestUtils documentation (apache#5664) MINOR: upgrade to jdk8 8u202 KAFKA-7693; Fix SequenceNumber overflow in producer (apache#5989) KAFKA-7692; Fix ProducerStateManager SequenceNumber overflow (apache#5990) MINOR: update copyright year in the NOTICE file. (apache#6196) KAFKA-7793: Improve the Trogdor command line. (apache#6133)
pengxiaolong
pushed a commit
to pengxiaolong/kafka
that referenced
this pull request
Jun 14, 2019
…5990) This patch fixes a few overflow issues with wrapping sequence numbers in the broker's producer state tracking. Reviewers: 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.
This is to fix Kafka 7692. The problem is at ProducerStateManager:Append(),
it has those lines:
updatedEntry.addBatch(epoch, lastSeq, lastOffset, lastSeq - firstSeq, lastTimestamp)
and
val firstOffset = lastOffset - (lastSeq - firstSeq)
However, lastSeq can wrap around and smaller than firstSeq. This will cause some exception later on (described in the JIRA 7692)
Test: Verified with local unitest and in our daily operation.