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


##########
modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterImpl.java:
##########
@@ -631,29 +632,43 @@ private void setBaselineTopology(long topVer, boolean 
isBaselineAutoAdjust) {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean enableWal(String cacheName) throws 
IgniteException {
-        return changeWalMode(cacheName, true);
+    @Override public boolean enableWal(String cacheOrGrpName) throws 
IgniteException {
+        return changeWalMode(cacheOrGrpName, true);
     }
 
     /** {@inheritDoc} */
-    @Override public boolean disableWal(String cacheName) throws 
IgniteException {
-        return changeWalMode(cacheName, false);
+    @Override public boolean disableWal(String cacheOrGrpName) throws 
IgniteException {
+        return changeWalMode(cacheOrGrpName, false);
     }
 
     /**
      * Change WAL mode.
      *
-     * @param cacheName Cache name.
+     * @param cacheOrGrpName Cache or cache group name.
      * @param enabled Enabled flag.
      * @return {@code True} if WAL mode was changed as a result of this call.
      */
-    private boolean changeWalMode(String cacheName, boolean enabled) {
-        A.notNull(cacheName, "cacheName");
+    private boolean changeWalMode(String cacheOrGrpName, boolean enabled) {
+        A.notNull(cacheOrGrpName, "cacheOrGrpName");
 
         guard();
 
+        List<String> cacheNames = new ArrayList<>();
+
+        int cacheOrGrpId = CU.cacheId(cacheOrGrpName);
+        CacheGroupDescriptor grpDesc = 
ctx.cache().cacheGroupDescriptor(cacheOrGrpId);
+
+        if (grpDesc != null) {
+            for (DynamicCacheDescriptor cacheDesc : 
ctx.cache().cacheDescriptors().values()) {

Review Comment:
   It looks we can extract caches with `grpDesc#caches()`?



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