KAFKA-10198: guard against recycling dirty state#8924
Merged
guozhangwang merged 3 commits intoapache:trunkfrom Jun 25, 2020
Merged
Conversation
ableegoldman
commented
Jun 24, 2020
| /** | ||
| * You must commit a task and checkpoint the state manager before closing as this will release the state dir lock | ||
| */ | ||
| private void close(final boolean clean) { |
Member
Author
There was a problem hiding this comment.
This diff turned out a bit awkward, basically I just factored this check out into a separate method that we should call at the beginning of both flavors of clean close
mjsax
approved these changes
Jun 24, 2020
Member
|
Retest this please. |
Contributor
|
LGTM. |
vvcephei
approved these changes
Jun 25, 2020
Contributor
vvcephei
left a comment
There was a problem hiding this comment.
Thanks for the fix, and for the test coverage, @ableegoldman !
Member
Author
|
Two unrelated test failures: |
guozhangwang
pushed a commit
that referenced
this pull request
Jun 25, 2020
We just needed to add the check in StreamTask#closeClean to closeAndRecycleState as well. I also renamed closeAndRecycleState to closeCleanAndRecycleState to drive this point home: it needs to be clean. This should be cherry-picked back to the 2.6 branch Reviewers: Matthias J. Sax <matthias@confluent.io>, John Roesler <john@confluent.io>, Guozhang Wang <wangguoz@gmail.com>,
Contributor
|
Merged to trunk and cherry-picked to 2.6 |
Kvicii
pushed a commit
to Kvicii/kafka
that referenced
this pull request
Jun 27, 2020
* 'trunk' of github.com:apache/kafka: KAFKA-10180: Fix security_config caching in system tests (apache#8917) KAFKA-10173: Fix suppress changelog binary schema compatibility (apache#8905) KAFKA-10166: always write checkpoint before closing an (initialized) task (apache#8926) MINOR: Rename SslTransportLayer.State."NOT_INITALIZED" enum value to "NOT_INITIALIZED" MINOR: Update Scala to 2.13.3 (apache#8931) KAFKA-9076: support consumer sync across clusters in MM 2.0 (apache#7577) MINOR: Remove Diamond and code code Alignment (apache#8107) KAFKA-10198: guard against recycling dirty state (apache#8924)
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.
We just needed to add the check in
StreamTask#closeCleantocloseAndRecycleStateas well. I also renamedcloseAndRecycleStatetocloseCleanAndRecycleStateto drive this point home: it needs to be clean.This should be cherry-picked back to the 2.6 branch