suzhiking opened a new pull request, #24224: URL: https://github.com/apache/kafka/pull/24224
The cherry-pick of KAFKA-21102 (#23530) to this branch added `ModernGroup.clearTargetAssignment`. The replay of a `ConsumerGroupTargetAssignmentMetadata` or `ShareGroupTargetAssignmentMetadata` tombstone calls it to remove the target assignments that are left when compaction removed the per-member target assignment tombstones. It only clears `targetAssignment`. That is correct on trunk, where KAFKA-21318 (#23883) removed the inverted target assignment, but this branch still has `invertedTargetAssignment`, which `GroupSpecImpl.isPartitionAssigned` reads when a target assignment is computed. After such a tombstone, the inverted target assignment still held the partitions of the removed target assignments. This patch also clears `invertedTargetAssignment` in `clearTargetAssignment`. It asserts that the inverted target assignment is empty in the `clearTargetAssignment` tests of `ConsumerGroupTest` and `ShareGroupTest` and in the consumer and share target assignment metadata tombstone replay tests of `GroupMetadataManagerTest`. Those four tests fail without the fix. -- 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]
