sanpwc commented on code in PR #3784:
URL: https://github.com/apache/ignite-3/pull/3784#discussion_r1611852412


##########
modules/core/src/main/java/org/apache/ignite/internal/manager/IgniteComponent.java:
##########
@@ -44,10 +47,21 @@ default void beforeNodeStop() {
     }
 
     /**
-     * Stops the component. It's guaranteed that during {@code 
IgniteComponent#stopAsync())} all components beneath given one are still
-     * running, however the node is no longer part of the topology and, 
accordingly, network interaction is impossible.
+     * Stops the component. It's guaranteed that during {@code 
IgniteComponent#stopAsync(ExecutorService))} all components beneath given one
+     * are still running, however the node is no longer part of the topology 
and, accordingly, network interaction is impossible.
      *
+     * @param stopExecutor The executor that will execute the async part of 
stop.
      * @return Future that will be completed when the asynchronous part of the 
stop is processed.
      */
-    CompletableFuture<Void> stopAsync();
+    CompletableFuture<Void> stopAsync(ExecutorService stopExecutor);
+
+
+    /**
+     * Stops the component. Calls {@link 
IgniteComponent#stopAsync(ExecutorService)} with {@link 
ForkJoinPool#commonPool()}.
+     *
+     * @return Future that will be completed when the asynchronous part of the 
stop is processed.
+     */
+    default CompletableFuture<Void> stopAsync() {

Review Comment:
   Why do we need it?



##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -169,8 +170,8 @@ public CompletableFuture<Void> startAsync() {
 
         updateLog.registerUpdateHandler(new OnUpdateHandlerImpl());
 
-        return updateLog.startAsync()
-                .thenCompose(none -> {
+        return updateLog.startAsync(startupExecutor)
+                .thenComposeAsync(none -> {
                     if (latestCatalogVersion() == emptyCatalog.version()) {
                         int initializedCatalogVersion = emptyCatalog.version() 
+ 1;
 

Review Comment:
   Which thread will complete catalogReadyFuture?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to