dajac commented on a change in pull request #10326:
URL: https://github.com/apache/kafka/pull/10326#discussion_r597662883



##########
File path: core/src/main/scala/kafka/server/ReplicaManager.scala
##########
@@ -1263,7 +1263,7 @@ class ReplicaManager(val config: KafkaConfig,
             .map(replica => new DefaultReplicaView(
               replicaEndpoints.getOrElse(replica.brokerId, Node.noNode()),
               replica.logEndOffset,
-              currentTimeMs - replica.lastCaughtUpTimeMs))
+              if (replica.lastCaughtUpTimeMs == 0) Long.MaxValue else 
currentTimeMs - replica.lastCaughtUpTimeMs))

Review comment:
       Did you consider filtering out replicas which never caught up? It feels 
a bit weird to do this here to filter them out later on in the 
`RackAwareReplicaSelector` anyway. Are there any other considerations?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to