You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mumrah (via GitHub)" <gi...@apache.org> on 2023/04/20 14:06:37 UTC

[GitHub] [kafka] mumrah commented on a diff in pull request #13461: KAFKA-14840: Support for snapshots during ZK migration

mumrah commented on code in PR #13461:
URL: https://github.com/apache/kafka/pull/13461#discussion_r1172646961


##########
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java:
##########
@@ -174,12 +173,12 @@ private boolean areZkBrokersReadyForMigration() {
     /**
      * Apply a function which transforms our internal migration state.
      *
-     * @param name  A descriptive name of the function that is being applied
-     * @param stateMutator  A function which performs some migration operations and possibly transforms our internal state
+     * @param name         A descriptive name of the function that is being applied
+     * @param migrationOp  A function which performs some migration operations and possibly transforms our internal state
      */
-    private void apply(String name, Function<ZkMigrationLeadershipState, ZkMigrationLeadershipState> stateMutator) {
+    private void applyMigrationOperation(String name, KRaftMigrationOperation migrationOp) {
         ZkMigrationLeadershipState beforeState = this.migrationLeadershipState;
-        ZkMigrationLeadershipState afterState = stateMutator.apply(beforeState);
+        ZkMigrationLeadershipState afterState = migrationOp.apply(beforeState);
         log.trace("{} transitioned from {} to {}", name, beforeState, afterState);

Review Comment:
   I'll add this to the current PR. Shouldn't be too hard



-- 
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-unsubscribe@kafka.apache.org

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