-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-6054: Add 'version probing' to Kafka Streams rebalance #4636
Merged
mjsax
merged 19 commits into
apache:trunk
from
mjsax:kafka-6054-fix-upgrade-system-test
May 31, 2018
Merged
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3f2647f
KAFKA-6054: Add Kafka Streams rebalance metadata 'version probing'
mjsax ef378a6
Github comments
mjsax a45f26b
x
mjsax c8484ec
Remove versionProbingFlag from TaskManager
mjsax 0804910
Fix system test Kafka version
mjsax 82a6758
Rebased
mjsax 0037e74
Send empty assignment only to version-probing instance
mjsax 622aa0a
Some code cleanup
mjsax a51b12d
Updates assignment strategy for version-probing phase
mjsax 6793c2f
System tests
mjsax 1671fe6
Do real rolling bounce test
mjsax 3a7c513
Updated version probing protocol and adjusted system test
mjsax 9ef1dfb
fix unit tests
mjsax 6a077ec
Fix checkstyle
mjsax 7b01cae
Fixed system test
mjsax e3035e8
Github comment
mjsax e6d576f
Github comments
mjsax 5c0853e
Fix checkstyle
mjsax 0a87bd5
fix system test
mjsax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
108 changes: 91 additions & 17 deletions
108
streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm probably missing something and brought this up before, but above in
onPartitionsAssigned
we create tasks with theassignment
when not version probing. But inonPartitionsRevoked
if we are version probing we flip the version probing flag, hence on assignment we create tasks. Why don't we flip the version probing flag inonPartitionedAssigned
as an else statement on line 270 so we are only every suspending and creating tasks during non-version probing rebalances?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onPartitionsAssigned
: if version probing flag is set, it means assignment is empty and we want to trigger a new rebalance. If we calltaskManager.createTasks(assignment);
, we would close suspended task and that is what we do not want to do at this point, because we hope to get those task assigned after the second rebalance.onPartitionsRevoked
: if version probing flag is set, we don't want to suspend tasks either. Tasks are already suspended but if we calltaskManager.suspendTasksAndState();
again, we loose the information about currently suspended tasks (but we need to keep this information; ie, we avoid an incorrect internal metadata update here).The flow is the following:
Does this make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep - thanks for the clarification