squah-confluent opened a new pull request, #23883: URL: https://github.com/apache/kafka/pull/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. Each BitSet is sized to the topic's partition count in the metadata image, and partitions beyond it are dropped. Only the uniform homogeneous assignor calls isPartitionAssigned, so other assignors no longer compute it, and GroupSpecBuilder no longer copies the inverted target assignment when assignor offload is enabled. 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. When a request removes a member and runs the assignor, the assignor now sees the removed member's partitions as unassigned. Previously, it saw them as assigned, because the group's inverted target assignment is only updated when the request's records are replayed. This makes build in TargetAssignmentBuilderBenchmark 48-54% faster for homogeneous groups of 5000 and 10000 members, because isPartitionAssigned no longer looks up partitions in the inverted target assignment's TimelineHashMaps, which are slower than regular maps. Co-Authored-By: Claude Opus 5.5 <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
