lucliu1108 commented on code in PR #24065:
URL: https://github.com/apache/kafka/pull/24065#discussion_r4438451731


##########
clients/src/main/java/org/apache/kafka/clients/admin/Admin.java:
##########
@@ -704,6 +704,10 @@ default DeleteRecordsResult 
deleteRecords(Map<TopicPartition, RecordsToDelete> r
      * if the records of the partition can not be deleted due to the 
configured {@code cleanup.policy},
      * for example because the topic's {@code cleanup.policy} is {@code 
compact} and does not include
      * {@code delete}.</li>
+     * <li>{@link org.apache.kafka.common.errors.OffsetOutOfRangeException}
+     * if the given offset is negative and not {@code -1}, or is larger than 
the high watermark
+     * of the partition. An offset of {@code -1} is replaced with the high 
watermark. When this

Review Comment:
   Fix: I reference it to this method. 
   In RecordsToDelete#beforeOffset(long) doc, also added another line 
"Otherwise, the offset must be at least 0 and at most the high watermark of the 
partition." to indicate the valid range, since Admin#deleteRecords references 
it for valid range now.



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