KAFKA-21140: Add randomized testbed for streams group task assignors - #23556
Open
gabriellefu wants to merge 4 commits into
Open
gabriellefu wants to merge 4 commits into
gabriellefu wants to merge 4 commits into
Conversation
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.
TaskAssignorTestbed— generates a random topology and group from a seed(two profiles:
SMALLfor logical corners,LARGEfor production shape), runs theassignor until the assignment is a fixed point, then applies random rebalance
events (process add/drop/restart/retag, member add/drop, standby count change)
and converges again. A failure prints the seed and the full history; replay a
single scenario with
STREAMS_ASSIGNOR_FUZZ_SEED=<seed>or shift the whole runwith
STREAMS_ASSIGNOR_FUZZ_BASE_SEED=<seed>(system properties work from an IDE).AssignmentInvariants— properties every assignor must satisfy, asserted onevery assignment: output covers exactly the group members, every task is active
on exactly one member, standbys only on stateful tasks, at most
numStandbyReplicasstandbys per task, no process holds two copies of a task.AssignmentMetrics— grades an assignment without asserting: active/totalspread per member, load spread per process, process/member stickiness, task
moves, rack diversity per tag. The summary over a run is printed so two versions
of an assignor can be compared.
StickyTaskAssignorFuzzTest— runsStickyTaskAssignorthrough the testbedand adds the checks its algorithm guarantees: no member above
ceil(activeTasks / members), every stateful task gets exactlymin(numStandbyReplicas, processes - 1)standbys, and rack-aware tags do notchange the active assignment.