lucasbru opened a new pull request, #20681: URL: https://github.com/apache/kafka/pull/20681
The changes introduce a revocationEpoch field to track the last epoch at which tasks were revoked from a member. This allows members to commit offsets using slightly stale epochs during the transition period after task revocation, preventing unnecessary fencing of legitimate commit requests. Most of the changes are just adding the new revocation epoch field to the model of a streams group member, both in the persisted state of the consumer offset topic, and in the member model. The revocation is only updated in CurrentAssignmentBuilder: When transitioning from UNREVOKED_TASKS to a new member epoch, the revocation is bumped to the old epoch. In all other states, the previous revocation epoch is preserved. The revocation epoch defaults to 0 for new members, and -1 for members whose metdata was restored from the consumer offset topic withou the new tagged field. The core logic change is inside `StreamsGroup`. If the revocationEpoch of the member is -1, we preserve the old commit validation logic. If the revocation epoch is zero or positive, we allow all offset commits with member epochs in the range (revocationEpoch, memberEpoch]. Delete this text and replace it with a detailed description of your change. The PR title and body will become the squashed commit message. If you would like to tag individuals, add some commentary, upload images, or include other supplemental information that should not be part of the eventual commit message, please use a separate comment. If applicable, please include a summary of the testing strategy (including rationale) for the proposed change. Unit and/or integration tests are expected for any behavior change and system tests should be considered for larger changes. -- 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]
