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


##########
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java:
##########
@@ -304,6 +468,44 @@ public void replay(FeatureLevelRecord record) {
         }
     }
 
+    /**
+     * Allowed state changes:
+     * <li>UNINITIALIZED -> ANY</li>
+     * <li>PRE_MIGRATION -> MIGRATION</li>
+     * <li>MIGRATION -> POST_MIGRATION</li>
+     */
+    void replay(ZkMigrationStateRecord record) {

Review Comment:
   I think this is way more complex than needed. All we need is something like 
this:
   ```
   migrationControlState.set(record.toState());
   ```
   plus a log4j message at INFO level.
   
   If it's in the metadata log, then we do it. We don't second guess what's in 
the metadata log. The time for checking whether the state transition was legal 
was when we were deciding to write the record, not when we're replaying it.



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