-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KAFKA-17898: Refine Epoch Bumping Logic (#17849)
With KAFKA-14562, we implemented epoch bump on both the client and the server. Mentioned below are the different epoch bump scenarios we have on hand after enabled tv2 Non-Transactional Producers • Epoch bumping is always allowed. • Different code paths are used to handle epoch bumping. Transactional Producers No Epoch Bump Allowed • coordinatorSupportsBumpingEpoch = false when initPIDVersion < 3 or initPIDVersion = null. Client-Triggered Epoch Bump Allowed • coordinatorSupportsBumpingEpoch = true when initPIDVersion >= 3. • TransactionVersion2Enabled = false when endTxnVersion < 5. Only Server-Triggered Epoch Bump Allowed • TransactionVersion2Enabled = true and endTxnVersion >= 5. We want to refine the code and make it more structured to correctly handle epoch bumping in the above mentioned cases. The changes made in this patch are: Rename epochBumpRequired to epochBumpTriggerRequired to symbolize a manual epoch bump request from the client Modify canEpochBump method according to the above mentioned scenarios Reviewers: Artem Livshits <[email protected]>, Calvin Liu <[email protected]>, Justine Olshan <[email protected]>
- Loading branch information
Showing
2 changed files
with
155 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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