jsancio commented on a change in pull request #9512:
URL: https://github.com/apache/kafka/pull/9512#discussion_r534489751



##########
File path: raft/src/main/java/org/apache/kafka/raft/RaftClient.java
##########
@@ -100,4 +102,15 @@ default void handleResign() {}
      */
     CompletableFuture<Void> shutdown(int timeoutMs);
 
+    /**
+     * Create a writable snapshot file for a given offset and epoch.
+     *
+     * The RaftClient assumes that the snapshot return will contain the 
records up to but
+     * not including the end offset in the snapshot id. See {@link 
SnapshotWriter} for
+     * details on how to use this object.
+     *
+     * @param snapshotId the end offset and epoch that identifies the snapshot

Review comment:
       Yeah. I'll create a Jira to validate the snapshot id. We should perform 
at least the following validations:
   1. it is less than the high-watermark.
   2. it is a valid epoch and end offset based on the log. I think we can use 
the leader epoch cache to check this.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to