dengziming opened a new pull request #9638:
URL: https://github.com/apache/kafka/pull/9638
The `KafkaRaftClient.onBecomeLeader` will invoke
`appendLeaderChangeMessage`, the call stack are:
```
1. appendLeaderChangeMessage
1.1 flushLeaderLog
1.1.1 updateLeaderEndOffsetAndTimestamp
1.1.2 log.flush()
```
so the `updateLeoAndTs ` is already invoked, and `updateLeoAndTs` should
only be invoked after leo change(or time change), since `log.flush()` will not
change leo(and ts), it's unnessary to invoke twice.
----------------------------------------------------------------
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:
[email protected]