{{ message }}
Repository navigation
KAFKA-20292: Avoid copying share group assignable partitions in GroupSpecBuilder - #23896
Open
squah-confluent wants to merge 2 commits into
Open
squah-confluent wants to merge 2 commits into
squah-confluent wants to merge 2 commits into
Conversation
Contributor
Author
airlock-confluentinc
Bot
force-pushed
the
squah-skip-groupspec-assignable-partitions-copy
branch
from
October 21, 2026 12:03
93f9b64 to
b7d27bc
Compare
… lazily (apache#23883) Replace GroupSpecImpl's inverted target assignment with a BitSet of the assigned partitions of each topic, computed from the members' current assignments on the first call to isPartitionAssigned. Only the uniform homogeneous assignor calls isPartitionAssigned, so other assignors no longer compute it. This makes build in TargetAssignmentBuilderBenchmark ~40% faster for homogeneous groups, because isPartitionAssigned no longer looks up partitions in the inverted target assignment's TimelineHashMaps, which are slower than regular maps. It also fixes a bug where the assignor saw the partitions of members removed in the same request as still assigned. The bug is not reachable today, since we do not compute a new target assignment when a member leaves, only on the next heartbeat, and static member replacement keeps the replaced member's partitions assigned. Remove ModernGroup's inverted target assignment, since it is no longer read. For share groups, it was never correct, because a partition can be assigned to several members of a share group, while the inverted target assignment holds a single member per partition. Rename buildAssignment in TargetAssignmentBuilderBenchmark to buildGroupSpecAndAssignment, which builds a new group spec on every invocation, so that the cost of computing the assigned partitions is included, and replace buildGroupSpecWithoutOffload and buildGroupSpecWithOffload with an assignorOffload parameter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Reviewers: David Jacot <dajac@apache.org>
…SpecBuilder Pass the share group state partition metadata to ShareGroupSpecBuilder and look up assignable partitions in a ShareGroupSpecImpl subclass, instead of copying the initialized partitions into GroupSpecImpl on every share group assignment, and again for assignor offload. The metadata is unmodifiable, so no copy is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
airlock-confluentinc
Bot
force-pushed
the
squah-skip-groupspec-assignable-partitions-copy
branch
from
October 21, 2026 17:25
b7d27bc to
4983f8b
Compare
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.

Pass the share group state partition metadata to ShareGroupSpecBuilder
and look up assignable partitions in a ShareGroupSpecImpl subclass,
instead of copying the initialized partitions into GroupSpecImpl on
every share group assignment, and again for assignor offload. The
metadata is unmodifiable, so no copy is needed.
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com