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



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFutureTask.java
##########
@@ -453,28 +471,22 @@ else if (affNode && missed.isEmpty() && 
cctx.kernalContext().query().moduleEnabl
 
                 CacheGroupContext gctx = cctx.cache().cacheGroup(grpId);
 
-                if (gctx == null) {
-                    throw new IgniteCheckedException("Cache group context has 
not found " +
-                        "due to the cache group is stopped: " + grpId);
-                }
-
-                for (int partId : e.getValue()) {
-                    GroupPartitionId pair = new GroupPartitionId(grpId, 
partId);
-
-                    PageStore store = pageStore.getStore(grpId, partId);
+                if (gctx == null)
+                    throw new IgniteCheckedException("Cache group is stopped : 
" + grpId);
 
-                    partDeltaWriters.put(pair,
-                        new PageStoreSerialWriter(store,
-                            partDeltaFile(cacheWorkDir(tmpConsIdDir, 
cacheDirName(gctx.config())), partId)));
+                ccfgs.add(gctx.config());
+                addPartitionWriters(grpId, e.getValue(), () -> 
FilePageStoreManager.cacheDirName(gctx.config()));
+            }
 
-                    partFileLengths.put(pair, store.size());
-                }
+            if (withMetaStorage) {
+                processed.put(MetaStorage.METASTORAGE_CACHE_ID, 
MetaStorage.partitions());
 
-                ccfgs.add(gctx.config());
+                addPartitionWriters(MetaStorage.METASTORAGE_CACHE_ID, 
MetaStorage.partitions(),
+                    () -> cacheDirName(MetaStorage.METASTORAGE_CACHE_ID));

Review comment:
       Why not pass MetaStorage.``META_STORAGE_DIR_NAME`` directly (instead of 
``cacheDirName(MetaStorage.METASTORAGE_CACHE_ID)``)?




-- 
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.

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


Reply via email to