chia7712 commented on code in PR #20348: URL: https://github.com/apache/kafka/pull/20348#discussion_r2291896856
########## raft/src/main/java/org/apache/kafka/raft/internals/EpochElection.java: ########## @@ -28,7 +28,7 @@ * Tracks the votes cast by voters in an election held by a Nominee. */ public class EpochElection { Review Comment: > mutable state voterStates `voterStates` is changed to a "final" member in this PR, so `EpochElection` could be a record class now. ```java public record EpochElection(Map<Integer, VoterState> voterStates) { public EpochElection(Set<ReplicaKey> voterStates) { this(voterStates.stream().collect(Collectors.toMap(ReplicaKey::id, VoterState::new))); } ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org