cmccabe commented on code in PR #16230: URL: https://github.com/apache/kafka/pull/16230#discussion_r1672762239
########## raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java: ########## @@ -3027,6 +3028,11 @@ public long logEndOffset() { return log.endOffset().offset(); } + @Override + public KRaftVersion kraftVersion() { + return partitionState.kraftVersionAtOffset(quorum.highWatermark().get().offset()); + } Review Comment: > The offset used should be quorum.highWatermark.map(hwm -> hwm.offset() - 1). The HWM is an exclusive offset Fixed > (comments about committed vs. uncommitted version) I'm fine with returning uncommitted version here. Since this is accessed from brokers there shouldn't even be any difference (well, except in the combined case) -- 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