mumrah commented on a change in pull request #9100:
URL: https://github.com/apache/kafka/pull/9100#discussion_r490594335



##########
File path: core/src/main/scala/kafka/cluster/Partition.scala
##########
@@ -618,9 +682,9 @@ class Partition(val topicPartition: TopicPartition,
         // since the replica's logStartOffset may have incremented
         val leaderLWIncremented = newLeaderLW > oldLeaderLW
 
-        // check if we need to expand ISR to include this replica
-        // if it is not in the ISR yet
-        if (!inSyncReplicaIds.contains(followerId))
+        // Check if this in-sync replica needs to be added to the ISR. We look 
at the "maximal" ISR here so we don't
+        // send an additional Alter ISR request for the same replica

Review comment:
       Yea checking the maximal set isn't needed anymore since adding the 
sealed trait. I'll just update this to simply call `maybeExpandIsr` which will 
do the check you propose here




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