lucliu1108 opened a new pull request, #21508: URL: https://github.com/apache/kafka/pull/21508
## Summary This PR is an implementation of KIP-1251: https://cwiki.apache.org/confluence/display/KAFKA/KIP-1251%3A+Assignment+epochs+for+consumer+groups This change introduces per-partition assignment epochs to relax the strict member epoch validation for consumer group offset commits. When receiving an offset commit request that includes the client-side member epoch and a member ID, we previously require checking ``` clientEpoch == brokerEpoch ``` for a valid offset commit, which could lead to false fencing. We now allow a relaxed offset commit check using an assignment epoch for each assigned partition and each member, ``` assignmentEpoch <= clientEpoch <= brokerEpoch ``` This prevents false rejections of legitimate offset commits when a member's epoch is bumped but the client hasn't received the update yet. ## Changes - Add `AssignmentEpochs` field to `TopicPartitions` in `ConsumerGroupCurrentMemberAssignmentValue` schema - Add `assignedPartitionsWithEpochs` and `partitionsPendingRevocationWithEpochs` to `ConsumerGroupMember` - Update `ConsumerGroup.validateOffsetCommit()` with relaxed validation logic - Add `createAssignmentEpochValidator()` for per-partition epoch checks - Update `GroupCoordinatorRecordHelpers` to serialize assignment epochs -- 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]
