jsancio commented on PR #13765: URL: https://github.com/apache/kafka/pull/13765#issuecomment-1573750489
> Actually, one thing I was wondering about this change since I am not that familiar with what the metadata version gates - does the change in the PR allow leader epochs to go backwards? The important observation is that this PR doesn't change the semantic of replaying `PartitionRecord` and `PartitionChangeRecord` with with respect to leader epoch bump. When replaying `PartitionChangeRecord` the state machines (controller and broker) will increase the leader epoch if the field `Leader` is set. This holds true before and after this PR. What this PR changes is when the controller sets the `Leader` field in `PartitionChangeRecord`. I should also point out that the MV check is not require for correctness. It is there for performance so that the PRODUCER request doesn't timeout and so that the Kafka producer doesn't have to retry the PRODUCE message. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org