dajac commented on code in PR #12181:
URL: https://github.com/apache/kafka/pull/12181#discussion_r893238704
##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -159,48 +159,63 @@ sealed trait PartitionState {
}
sealed trait PendingPartitionChange extends PartitionState {
+ def lastCommittedState: PartitionState
Review Comment:
> Is the type PartitionState too flexible? Should this always be
CommittedPartitionState?
I think that it makes sense to use `CommittedPartitionState` here. I don't
think that it is necessary to move `lastCommittedState` to
`CommittedPartitionState` though because we can only revert based on a
`PendingPartitionChange`.
> Now that we have lastCommittedState, I think that we have redundant data
in both PendingPartitionChange types. For example, isr is always set to
lastCommittedState.isr.
Yeah, that is right. Let me consolidate. For now, I have changed
`newLeaderAndIsr`. I will take a look at this as part of
https://issues.apache.org/jira/browse/KAFKA-13844.
--
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]