TaiJuWu opened a new pull request, #21025:
URL: https://github.com/apache/kafka/pull/21025
1. Track Seen Voters (KRaftControlRecordStateMachine)
- Added seenReplicaKey: Set<ReplicaKey> to maintain a historical record
of all voters
- Populates this set when processing KRAFT_VOTERS control records
- Provides hasSeenReplicaKey() method for validation
2. Server-side Validation (AddVoterHandler)
- Check if the voter key has been seen before processing the request
- Return INVALID_VOTER_KEY error if the replica has already joined
previously
- Prevents duplicate auto-join attempts at the protocol level
3. Client-side Handling (KafkaRaftClient)
- Added hasJoined flag to track successful join state
- Set hasJoined = true when receiving INVALID_VOTER_KEY error
- Prevents further auto-join attempts after initial join or rejection
--
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]