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


##########
modules/core/src/main/java/org/apache/ignite/IgniteSnapshot.java:
##########
@@ -69,9 +70,10 @@ public interface IgniteSnapshot {
      * In-memory cache groups also supported.
      *
      * @param name Dump name.
+     * @param cacheGroupNames Cache groups to include in snapshot or {@code 
null} to include all.
      * @return Future which will be completed when dump ends.
      */
-    public IgniteFuture<Void> createDump(String name);
+    public IgniteFuture<Void> createDump(String name, @Nullable Set<String> 
cacheGroupNames);

Review Comment:
   Replace Set with Collection, as this style used in `restoreSnapshot` methods.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java:
##########
@@ -2299,6 +2302,7 @@ public IgniteFutureImpl<Void> createSnapshot(
             }
 
             List<String> grps = (dump ? 
cctx.cache().cacheGroupDescriptors().values() : 
cctx.cache().persistentGroups()).stream()
+                .filter(g -> cacheGroupNames == null || 
cacheGroupNames.contains(g.cacheOrGroupName()))

Review Comment:
   What if `cacheGroupNames` param contains non-existent cache group. Should we 
stop snapshot process? Or at least write a warning.



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