ahuang98 commented on code in PR #21238:
URL: https://github.com/apache/kafka/pull/21238#discussion_r2692402052
##########
raft/src/main/java/org/apache/kafka/raft/LeaderState.java:
##########
@@ -119,6 +119,7 @@ protected LeaderState(
Set<Integer> grantingVoters,
BatchAccumulator<T> accumulator,
int fetchTimeoutMs,
+ Optional<LogOffsetMetadata> leaderHighWatermark,
Review Comment:
nit: should we just call this `highWatermark` or `initialHighWatermark`?
I'm thinking in the worst case scenario where our highWatermark actually
decreases on/as a result of leader change (e.g. voter set shrinks unexpectedly
and causes HW to decreased) we could report an incorrect HW. Any thoughts on
recalculating the HW on leader change (like through a call to
`maybeUpdateHighWatermark`) vs passing along the last known HW?
--
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]