dajac commented on code in PR #12181:
URL: https://github.com/apache/kafka/pull/12181#discussion_r893625471
##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1571,14 +1620,26 @@ class Partition(val topicPartition: TopicPartition,
error match {
case Errors.OPERATION_NOT_ATTEMPTED =>
// Since the operation was not attempted, it is safe to reset back to
the committed state.
- partitionState = CommittedPartitionState(proposedIsrState.isr,
LeaderRecoveryState.RECOVERED)
+ partitionState = proposedIsrState.lastCommittedState
Review Comment:
When we receive OPERATION_NOT_ATTEMPTED or INELIGIBLE_REPLICA, the
controller has not done anything with out request besides validating it. This
is why, I think that it is safe to revert to the last committed state, assuming
that the partition epoch has not changed in the meantime.
Is your question about those two error codes or a more general one?
--
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]