mannoopj commented on code in PR #20707:
URL: https://github.com/apache/kafka/pull/20707#discussion_r2769846993


##########
raft/src/main/java/org/apache/kafka/raft/RaftClient.java:
##########
@@ -62,13 +62,26 @@ interface Listener<T> {
          */
         void handleLoadSnapshot(SnapshotReader<T> reader);
 
+        /**
+         * Callback which is invoked when the Listener needs to load bootstrap 
metadata.
+         * Bootstrap snapshots are uncommitted and only used for initial 
cluster state.
+         *
+         * The default implementation delegates to {@link 
#handleLoadSnapshot(SnapshotReader)}.
+         *
+         * @param reader snapshot reader instance which must be iterated and 
closed
+         */
+        default void handleLoadBootstrap(SnapshotReader<T> reader) {
+            handleLoadSnapshot(reader);
+        }

Review Comment:
   Wouldn't this mean we basically have to duplicate every handleloadSnapshot 
implementation so far as handleLoadBootstrap since the 0-0.checkpoint is 
already passed into these functions as uncommitted? I was trying to avoid this 
duplication originally but I'm a bit confused. For example currently in 
MetadataLoader we update metrics, deltas, manifests, not considering the 
records themselves for the 0-0.checkpoint before this PR. I'm trying to clarify 
this behavior is incorrect or not and whether or not we have to duplicate these 
functions.
   



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