Skip to content

HOTFIX: move rebalanceInProgress check to skip commit during handleCorrupted#10444

Merged
ableegoldman merged 2 commits intoapache:trunkfrom
ableegoldman:HOTFIX-catch-RebalanceInProgressException
Mar 31, 2021
Merged

HOTFIX: move rebalanceInProgress check to skip commit during handleCorrupted#10444
ableegoldman merged 2 commits intoapache:trunkfrom
ableegoldman:HOTFIX-catch-RebalanceInProgressException

Conversation

@ableegoldman
Copy link
Copy Markdown
Member

Minor followup to #10407 -- we need to extract the rebalanceInProgress check down into the commitAndFillInConsumedOffsetsAndMetadataPerTaskMap method which is invoked during handleCorrupted, otherwise we may attempt to commit during a a rebalance which will fail

@ableegoldman ableegoldman requested a review from mjsax March 30, 2021 23:55
Comment on lines +1042 to +1044
if (rebalanceInProgress) {
return -1;
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only logical change, I moved this check from TaskManager#commit to this method. And added a bunch of comments/docs so we don't forget this again

@mjsax mjsax added the streams label Mar 31, 2021
@ableegoldman
Copy link
Copy Markdown
Member Author

Two unrelated test failures:
org.apache.kafka.connect.integration.RebalanceSourceConnectorsIntegrationTest.testMultipleWorkersRejoining
kafka.api.ConsumerBounceTest.testCloseDuringRebalance

@ableegoldman ableegoldman merged commit 3eff8d3 into apache:trunk Mar 31, 2021
@ableegoldman
Copy link
Copy Markdown
Member Author

Merged to trunk and cherrypicked to 2.8 cc @vvcephei

ableegoldman added a commit that referenced this pull request Mar 31, 2021
…rrupted (#10444)

Minor followup to #10407 -- we need to extract the rebalanceInProgress check down into the commitAndFillInConsumedOffsetsAndMetadataPerTaskMap method which is invoked during handleCorrupted, otherwise we may attempt to commit during a a rebalance which will fail

Reviewers: Matthias J. Sax <mjsax@confluent.io>
Terrdi pushed a commit to Terrdi/kafka that referenced this pull request Apr 1, 2021
…rrupted (apache#10444)

Minor followup to apache#10407 -- we need to extract the rebalanceInProgress check down into the commitAndFillInConsumedOffsetsAndMetadataPerTaskMap method which is invoked during handleCorrupted, otherwise we may attempt to commit during a a rebalance which will fail

Reviewers: Matthias J. Sax <mjsax@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants