junrao commented on a change in pull request #9631: URL: https://github.com/apache/kafka/pull/9631#discussion_r532963241
########## File path: core/src/main/scala/kafka/cluster/Partition.scala ########## @@ -947,9 +947,10 @@ class Partition(val topicPartition: TopicPartition, leaderEndOffset: Long, currentTimeMs: Long, maxLagMs: Long): Boolean = { - val followerReplica = getReplicaOrException(replicaId) - followerReplica.logEndOffset != leaderEndOffset && - (currentTimeMs - followerReplica.lastCaughtUpTimeMs) > maxLagMs + getReplica(replicaId).fold(true) { followerReplica => Review comment: @jsancio : Yes, we can keep the logic in the PR. On the leader, the logic for shrinking ISR is checked every 10 secs by default. So, in the common case when completing a reassignment, the reduced ISR by the controller will be propagated to the leader before the leader's ISR shrinking logic kicks in. ---------------------------------------------------------------- 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