rpuch commented on code in PR #4239:
URL: https://github.com/apache/ignite-3/pull/4239#discussion_r1723307344


##########
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteServerImpl.java:
##########
@@ -188,13 +236,64 @@ public CompletableFuture<Void> waitForInitAsync() {
         return joinFuture;
     }
 
+    /**
+     * Restarts the node asynchronously. The {@link Ignite} instance obtained 
via {@link #api()} and objects acquired through it remain
+     * functional, but completion of calls to them might be delayed during the 
restart (that is, synchronous calls might take more time,
+     * while futures from asynchronous calls might take more time to complete).
+     *
+     * @return CompletableFuture that gets completed when the node startup has 
completed (either successfully or with an error).
+     */
+    CompletableFuture<Void> restartAsync() {

Review Comment:
   I fixed it a bit differently: I added `shutDown` flag that is rechecked on 
restart after acquiring the mutex.
   The future chaining is already implemented.
   CAS logic seems to be a bit more involved compared to simple and rude 
`synchronized`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to