jlprat commented on code in PR #16637:
URL: https://github.com/apache/kafka/pull/16637#discussion_r1718136830


##########
raft/src/main/java/org/apache/kafka/raft/LeaderState.java:
##########
@@ -702,27 +657,50 @@ private void updateVoterAndObserverStates(VoterSet 
lastVoterSet) {
 
         // Move any of the remaining old voters to observerStates
         for (ReplicaState replicaStateEntry : oldVoterStates.values()) {
+            replicaStateEntry.clearListeners();
             observerStates.putIfAbsent(replicaStateEntry.replicaKey, 
replicaStateEntry);
         }
     }
 
-    private static class ReplicaState implements Comparable<ReplicaState> {
-        ReplicaKey replicaKey;
-        Optional<LogOffsetMetadata> endOffset;
-        long lastFetchTimestamp;
-        long lastFetchLeaderLogEndOffset;
-        long lastCaughtUpTimestamp;
-        boolean hasAcknowledgedLeader;
+    static class ReplicaState implements Comparable<ReplicaState> {

Review Comment:
   This static class should be public as it is exposed in 
`RaftUtil.singletonDescribeQuorumResponse`. Right now this class is exposed 
outside of it's visibility scope.



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

Reply via email to