squah-confluent commented on code in PR #22444:
URL: https://github.com/apache/kafka/pull/22444#discussion_r3342721603


##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/PartitionWriter.java:
##########
@@ -33,8 +33,24 @@ public interface PartitionWriter {
     /**
      * Listener allowing to listen to high watermark changes. This is meant
      * to be used in conjunction with {@link 
PartitionWriter#append(TopicPartition, VerificationGuard, MemoryRecords, 
short)}.
+     * <p>
+     * High watermark updates are delivered only while this broker is the 
leader of the
+     * partition. Once the partition is no longer led by this broker (it 
transitions to
+     * follower, is deleted or fails), no further updates are delivered. This 
guarantee

Review Comment:
   On the first pass, I read this as "updates are only delivered while the 
broker is the leader" instead of "updates stop forever once the broker is no 
longer the leader", probably because of the first sentence. Maybe we can make 
this clearer?
   
   `no further updates are delivered, even if the broker regains leadership.`?



##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/PartitionWriter.java:
##########


Review Comment:
   I think we should also call out the unexpected behavior on the 
`registerListener` javadoc.



-- 
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]

Reply via email to