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


##########
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java:
##########
@@ -491,6 +536,13 @@ public void run() throws Exception {
                 return;
             }
 
+            if (!curLeaderAndEpoch.equals(leaderAndEpoch)) {

Review Comment:
   Yea I wondered about this. In general, I'd like to avoid changing too much 
in MetadataChangeEvent.
   
   Notice how MetadataChangeEvent doesn't use checkDriverState. This is because 
it needs to check both the driver state as well as the metadata log state. For 
the driver check this event can actually run in multiple states (since it's how 
we learn about brokers registering). It also has to check the migration state 
from the log to avoid trying to do dual writes before the migration is complete 
(the driver will see partial metadata get published for versions not including 
metadata transactions).



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