cmccabe commented on code in PR #13461: URL: https://github.com/apache/kafka/pull/13461#discussion_r1171945097
########## 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 feel like if the state is meaningfully different, we'd want this to be higher than TRACE. Like the metadata offset change is fine to log at TRACE, but if the controller epoch changes or controller ID changes, wouldn't we want this to be INFO? I guess we could do this in a follow-on PR as well -- 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