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



##########
File path: raft/src/main/java/org/apache/kafka/raft/ReplicatedLog.java
##########
@@ -149,6 +152,29 @@ default OptionalLong truncateToEndOffset(OffsetAndEpoch 
endOffset) {
         return OptionalLong.of(truncationOffset);
     }
 
+    /**
+     * Create a writable snapshot for the given snapshot id.
+     *
+     * See {@link RawSnapshotWriter} for details on how to use this object.
+     *
+     * @param snapshotId the end offset and epoch that identifies the snapshot
+     * @return a writable snapshot
+     */
+    RawSnapshotWriter createSnapshot(OffsetAndEpoch snapshotId) throws 
IOException;

Review comment:
       Yeah. I think we will need that when we implement deleting snapshot. Do 
you mind if I add this later?
   
   Also, I think we are going to need a `readLatestSnapshot()` when the state 
machine (controller or broker) needs to load the latest valid snapshot. I was 
planning to add this later when the case was clear to me.




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