timoninmaxim commented on code in PR #11298:
URL: https://github.com/apache/ignite/pull/11298#discussion_r1549754935


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java:
##########
@@ -163,10 +163,12 @@ public Dump(
      * @return Standalone kernal context.
      */
     private GridKernalContext standaloneKernalContext(File dumpDir, 
IgniteLogger log) {
-        File binaryMeta = 
CacheObjectBinaryProcessorImpl.binaryWorkDir(dumpDir.getAbsolutePath(), 
F.first(metadata).folderName());
+        SnapshotMetadata meta = metadata.stream().filter(m -> 
!m.partitions().isEmpty()).findFirst().orElse(F.first(metadata));
+
+        File binaryMeta = 
CacheObjectBinaryProcessorImpl.binaryWorkDir(dumpDir.getAbsolutePath(), 
meta.folderName());
         File marshaller = new File(dumpDir, DFLT_MARSHALLER_PATH);
 
-        A.ensure(binaryMeta.exists(), "binary metadata directory not exists");
+        A.ensure(meta.partitions().isEmpty() || binaryMeta.exists(), "binary 
metadata directory not exists");

Review Comment:
   If meta.partitions() is empty, it means dump doesn't have partitions at all 
- it looks like a bug.



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

Reply via email to