cmccabe commented on code in PR #13337:
URL: https://github.com/apache/kafka/pull/13337#discussion_r1130248758


##########
metadata/src/main/java/org/apache/kafka/image/publisher/MetadataPublisher.java:
##########
@@ -40,33 +40,30 @@ public interface MetadataPublisher extends AutoCloseable {
     String name();
 
     /**
-     * Publish a new cluster metadata snapshot that we loaded.
+     * Handle a change in the current controller.
      *
-     * @param delta    The delta between the previous state and the new one.
-     * @param newImage The complete new state.
-     * @param manifest The contents of what was published.
+     * @param newLeaderAndEpoch The new quorum leader and epoch. The new 
leader will be
+     *                          OptionalInt.empty if there is currently no 
active controller.
      */
-    void publishSnapshot(
-            MetadataDelta delta,
-            MetadataImage newImage,
-            SnapshotManifest manifest
-    );
+    default void handleControllerChange(LeaderAndEpoch newLeaderAndEpoch) { }

Review Comment:
   How about
   `void onControllerChange(LeaderAndEpoch newLeaderAndEpoch)`
   and
   `void onMetadataUpdate(MetadataDelta delta, MetadataImage newImage, 
LoaderManifest manifest);`?
   Might be clearer.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to