xtern commented on a change in pull request #9422:
URL: https://github.com/apache/ignite/pull/9422#discussion_r712073326



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -1750,6 +1768,53 @@ static void copy(FileIOFactory factory, File from, File 
to, long length) {
         return new 
IgniteFutureImpl<>(cctx.kernalContext().task().execute(taskCls, snpName));
     }
 
+    /**
+     * Snapshots view supplier.
+     *
+     * @param filter Filter.
+     */
+    private Iterable<SnapshotView> snapshotViewSupplier(Map<String, Object> 
filter) {
+        List<String> snapshotNames = localSnapshotNames();
+
+        String snapshotName = 
(String)filter.get(SnapshotViewWalker.SNAPSHOT_NAME_FILTER);
+        String nodeConsistentId = 
(String)filter.get(SnapshotViewWalker.NODE_CONSISTENT_ID_FILTER);
+
+        return F.flat(F.iterator(snapshotNames, snpName -> {
+                if (snapshotName != null && !snapshotName.equals(snpName))
+                    return Collections.emptyList();
+
+                return F.flat(F.iterator(readSnapshotMetadatas(snpName), meta 
-> {
+                        if (nodeConsistentId != null && 
!nodeConsistentId.equals(toStringSafe(meta.consistentId())))
+                            return Collections.emptyList();
+
+                        return F.iterator(getCacheGroupsName(meta), cacheGrp 
-> new SnapshotView(

Review comment:
       Can we use IgniteSnapshotManager#snapshotCacheDirectories (or 
FilePageStoreManager#cacheDirectories) instead of creating a new one?




-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to