xtern commented on a change in pull request #9444:
URL: https://github.com/apache/ignite/pull/9444#discussion_r729092617
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -1018,6 +1043,19 @@ public void cancelLocalSnapshotTask(String name) {
return restoreCacheGrpProc.cancel(new
IgniteCheckedException("Operation has been canceled by the user."), name);
}
+ /** {@inheritDoc} */
+ @Override public IgniteFuture<Map<Object, String>> statusSnapshot() {
+ cctx.kernalContext().security().authorize(ADMIN_SNAPSHOT);
+
+ Collection<ClusterNode> bltNodes =
F.view(cctx.discovery().serverNodes(AffinityTopologyVersion.NONE),
+ (node) -> CU.baselineNode(node,
cctx.kernalContext().state().clusterState()));
+
+ cctx.kernalContext().task().setThreadContext(TC_SKIP_AUTH, true);
+ cctx.kernalContext().task().setThreadContext(TC_SUBGRID, bltNodes);
+
+ return new IgniteFutureImpl<>(cctx.kernalContext().task().execute(new
SnapshotStatusTask(), null));
Review comment:
Let's try to do the following:
change signature of executeRestoreManagementTask to
```
/**
* @param taskCls Snapshot operation management task class.
* @param arg Task argument.
*/
private <K, V> IgniteFuture<V> executeSnapshotManagementTask(
Class<? extends ComputeTask<K, V>> taskCls,
K arg
) {
```
and replace this code with
```
return executeSnapshotManagementTask(SnapshotStatusTask.class, null);
```
--
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]