reta commented on code in PR #13689:
URL: https://github.com/apache/kafka/pull/13689#discussion_r1187596223


##########
storage/src/main/java/org/apache/kafka/server/log/remote/metadata/storage/TopicBasedRemoteLogMetadataManager.java:
##########
@@ -76,6 +78,11 @@ public class TopicBasedRemoteLogMetadataManager implements 
RemoteLogMetadataMana
     private final boolean startConsumerThread;
 
     private Thread initializationThread;
+
+    private static final long SHUTDOWN_TIMEOUT_SECONDS = 60L;
+
+    private CountDownLatch initializeLatch;

Review Comment:
   Just a suggestion, but I think you could simplify tracking the 
initialization flow by folding  `initializeLatch` & `initialized` into a 
`CompletableFuture` (which could also handle the case when close is called 
while the initialization is still in progress).



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