nizhikov commented on code in PR #11040:
URL: https://github.com/apache/ignite/pull/11040#discussion_r1395605455


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java:
##########
@@ -226,13 +228,21 @@ public List<StoredCacheData> configs(String node, int 
group) {
      */
     public List<Integer> partitions(String node, int group) {
         File[] parts = dumpGroupDirectory(node, group)
-            .listFiles(f -> f.getName().startsWith(PART_FILE_PREFIX) && 
f.getName().endsWith(DUMP_FILE_EXT));
+            .listFiles(f -> f.getName().startsWith(PART_FILE_PREFIX) &&

Review Comment:
   We have acceess to dump meta here.
   So we know exactly what file extension we are expecting to find.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java:
##########
@@ -226,13 +228,21 @@ public List<StoredCacheData> configs(String node, int 
group) {
      */
     public List<Integer> partitions(String node, int group) {
         File[] parts = dumpGroupDirectory(node, group)
-            .listFiles(f -> f.getName().startsWith(PART_FILE_PREFIX) && 
f.getName().endsWith(DUMP_FILE_EXT));
+            .listFiles(f -> f.getName().startsWith(PART_FILE_PREFIX) &&
+                (f.getName().endsWith(DUMP_FILE_EXT) ||
+                    f.getName().endsWith(DUMP_FILE_EXT + ZIP_SUFFIX)
+                )
+            );
 
         if (parts == null)
             return Collections.emptyList();
 
         return Arrays.stream(parts)
-            .map(partFile -> 
Integer.parseInt(partFile.getName().replace(PART_FILE_PREFIX, 
"").replace(DUMP_FILE_EXT, "")))
+            .map(partFile -> Integer.parseInt(partFile.getName()

Review Comment:
   We have acceess to dump meta here.
   So we know exactly what file extension we are expecting to find.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/Dump.java:
##########
@@ -247,7 +257,11 @@ public DumpedPartitionIterator iterator(String node, int 
group, int part) {
         FileIO dumpFile;
 
         try {
-            dumpFile = ioFactory.create(new File(dumpGroupDirectory(node, 
group), PART_FILE_PREFIX + part + DUMP_FILE_EXT));
+            File file = new File(dumpGroupDirectory(node, group), 
PART_FILE_PREFIX + part + DUMP_FILE_EXT);

Review Comment:
   We have acceess to dump meta here.
   So we know exactly what file extension we are expecting to find.



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