junrao commented on code in PR #18685:
URL: https://github.com/apache/kafka/pull/18685#discussion_r1985500986


##########
core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala:
##########
@@ -522,10 +522,14 @@ class KRaftMetadataCache(
     if (kraftVersionLevel > 0) {
       finalizedFeatures.put(KRaftVersion.FEATURE_NAME, kraftVersionLevel)
     }
+    var metadataVersion = MetadataVersion.MINIMUM_VERSION

Review Comment:
   @FrankYang0529 : Good finding! It seems that we should move 
`future.complete(null); ` to after `initializeNewPublishers();` in the code 
below. What do you think, @cmccabe?
   
   ```
       void scheduleInitializeNewPublishers(long delayNs) {
           eventQueue.scheduleDeferred(INITIALIZE_NEW_PUBLISHERS,
               new 
EventQueue.EarliestDeadlineFunction(eventQueue.time().nanoseconds() + delayNs),
               () -> {
                   try {
                       initializeNewPublishers();
                   } catch (Throwable e) {
                       faultHandler.handleFault("Unhandled error initializing 
new publishers", e);
                   }
               });
       }
   
   ```



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