timoninmaxim commented on code in PR #12419:
URL: https://github.com/apache/ignite/pull/12419#discussion_r2460135642
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotCheckProcess.java:
##########
@@ -232,11 +232,37 @@ private void reduceCustomHandlersResults(
});
}
- snpChecker.checkCustomHandlersResults(ctx.req.snapshotName(),
reduced);
+ Map<String, List<SnapshotHandlerResult<?>>> clusterResults = new
HashMap<>();
+ Collection<UUID> execNodes = new ArrayList<>(reduced.size());
+
+ // Checking node -> Map by consistend id.
+ for (Map.Entry<ClusterNode, Map<Object, Map<String,
SnapshotHandlerResult<?>>>> nodeRes : reduced.entrySet()) {
+ // Consistent id -> Map by handler name.
+ for (Map.Entry<Object, Map<String, SnapshotHandlerResult<?>>>
res : nodeRes.getValue().entrySet()) {
+ // Depending on the job mapping, we can get several
different results from one node.
+ execNodes.add(nodeRes.getKey().id());
+
+ Map<String, SnapshotHandlerResult<?>> nodeDataMap =
res.getValue();
+
+ assert nodeDataMap != null : "At least the default
snapshot restore handler should have been executed ";
+
+ for (Map.Entry<String, SnapshotHandlerResult<?>> entry :
nodeDataMap.entrySet()) {
+ String hndName = entry.getKey();
+
+ clusterResults.computeIfAbsent(hndName, v -> new
ArrayList<>()).add(entry.getValue());
+ }
+ }
+ }
+
+ kctx.cache().context().snapshotMgr().handlers().completeAll(
+ SnapshotHandlerType.RESTORE, ctx.req.snapshotName(),
clusterResults, execNodes, wrns -> {});
fut.onDone(new
SnapshotPartitionsVerifyTaskResult(ctx.clusterMetas, null));
}
catch (Throwable err) {
+ if (err instanceof Exception)
Review Comment:
remove this if condition
--
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]