sjhajharia commented on code in PR #20348:
URL: https://github.com/apache/kafka/pull/20348#discussion_r2291758320


##########
raft/src/main/java/org/apache/kafka/raft/LeaderAndEpoch.java:
##########
@@ -19,47 +19,15 @@
 import java.util.Objects;
 import java.util.OptionalInt;
 
-public class LeaderAndEpoch {
-    private final OptionalInt leaderId;
-    private final int epoch;
+public record LeaderAndEpoch(OptionalInt leaderId, int epoch) {
     public static final LeaderAndEpoch UNKNOWN = new 
LeaderAndEpoch(OptionalInt.empty(), 0);
 
     public LeaderAndEpoch(OptionalInt leaderId, int epoch) {

Review Comment:
   Make sense. I have added `LeaderAndEpochTest` for the same.



-- 
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

Reply via email to