divijvaidya commented on code in PR #13187: URL: https://github.com/apache/kafka/pull/13187#discussion_r1235943898
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1046,10 +1046,14 @@ class Partition(val topicPartition: TopicPartition, partitionState match { case currentState: CommittedPartitionState if outOfSyncReplicaIds.nonEmpty => val outOfSyncReplicaLog = outOfSyncReplicaIds.map { replicaId => - val logEndOffsetMessage = getReplica(replicaId) - .map(_.stateSnapshot.logEndOffset.toString) + val replicaStateSnapshot = getReplica(replicaId).map(_.stateSnapshot) + val logEndOffsetMessage = replicaStateSnapshot + .map(_.logEndOffset.toString) .getOrElse("unknown") - s"(brokerId: $replicaId, endOffset: $logEndOffsetMessage)" + val lastCaughtUpTimeMessage = replicaStateSnapshot + .map(_.lastCaughtUpTimeMs.toString) + .getOrElse("unknown") + s"(brokerId: $replicaId, endOffset: $logEndOffsetMessage, lastCaughtUpTime: $lastCaughtUpTimeMessage)" Review Comment: let's add unit to the time here. Otherwise it is difficult to figure out the unit sometimes. May I suggest changing changing name of lastCaughtUpTime to `lastCaughtUpTimeMs` instead? It is also consistent with https://github.com/apache/kafka/blob/474053d2973b8790e50ccfe1bb0699694b0de1c7/core/src/main/scala/kafka/cluster/Replica.scala#L178 -- 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