dajac commented on code in PR #12181:
URL: https://github.com/apache/kafka/pull/12181#discussion_r880242635


##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1574,6 +1586,13 @@ class Partition(val topicPartition: TopicPartition,
         debug(s"Failed to alter partition to $proposedIsrState since there is 
a pending AlterPartition still inflight. " +
           s"partition state has been reset to the latest committed state 
$partitionState")
         false
+      case Errors.INELIGIBLE_REPLICA =>
+        // Since the operation was rejected, it is safe to reset back to the 
committed state. This
+        // assumes that the current state was still the correct expected state.
+        partitionState = CommittedPartitionState(proposedIsrState.isr, 
LeaderRecoveryState.RECOVERED)

Review Comment:
   That makes sense. Let me add this.



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