Phillippko commented on code in PR #7156:
URL: https://github.com/apache/ignite-3/pull/7156#discussion_r2606441527
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java:
##########
@@ -1151,7 +1183,97 @@ private CompletableFuture<Void>
processNewRequest(DisasterRecoveryRequest reques
metaStorageManager.put(RECOVERY_TRIGGER_KEY, serializedRequest);
}
- return operationFuture;
+ return operationFuture.thenCompose(v -> {
+ if (request.type() == DisasterRecoveryRequestType.MULTI_NODE) {
+ return allOf(getNodeNames(request.nodeNames())
+ .stream()
+ .map(nodeName -> addMultiNodeOperation(nodeName,
operationId))
+ .toArray(CompletableFuture[]::new));
+ } else {
+ return nullCompletedFuture();
+ }
+ });
+ }
+
+ /** If request node names is empty, returns all nodes in the logical
topology. */
+ private Collection<String> getNodeNames(Set<String> requestNodeNames) {
+ if (requestNodeNames.isEmpty()) {
Review Comment:
updated description. It seems that we should add an interface for multi node
disaster recovery requests and move nodeNames there
--
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]