Cyrill commented on code in PR #3629:
URL: https://github.com/apache/ignite-3/pull/3629#discussion_r1580723266
##########
modules/runner/src/main/java/org/apache/ignite/internal/app/LifecycleManager.java:
##########
@@ -148,12 +153,11 @@ private synchronized void stopAllComponents() {
}
});
- new ReverseIterator<>(startedComponents).forEachRemaining(component ->
{
- try {
- component.stop();
- } catch (Exception e) {
- LOG.warn("Unable to stop component [component={},
nodeName={}]", e, component, nodeName);
- }
- });
+ List<CompletableFuture<Void>> allComponentsStopFuture = new
ArrayList<>();
+
+ new ReverseIterator<>(startedComponents).forEachRemaining(component ->
allComponentsStopFuture.add(component.stopAsync()));
+
+ allOf(allComponentsStopFuture.toArray(CompletableFuture[]::new))
+ .whenComplete((v, e) -> stopFuture.complete(null));
Review Comment:
https://issues.apache.org/jira/browse/IGNITE-22118
--
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]