denis-chudov commented on a change in pull request #9110:
URL: https://github.com/apache/ignite/pull/9110#discussion_r635969278



##########
File path: 
modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
##########
@@ -1112,9 +1112,11 @@
 
     /**
      * WAL rebalance threshold.
+     * @deprecated use Distributed MetaStorage property 
wal.rebalance.threshold.

Review comment:
       You could use `{@code ...}` notation to highlight the property name.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
##########
@@ -3734,4 +3749,22 @@ public RestoreLogicalState(CheckpointStatus status, 
WALIterator iterator, long l
             return Collections.unmodifiableMap(partitionRecoveryStates);
         }
     }
+
+    /** Registers {@link #walRebalanceThreshold} property in distributed 
metastore. */
+    private void initWalRebalanceThreshold() {
+        
cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(
+            new DistributedConfigurationLifecycleListener() {
+                @Override public void 
onReadyToRegister(DistributedPropertyDispatcher dispatcher) {
+                    String logMsgFmt = "Historical rebalance WAL threshold 
[property=%s] changed[oldVal=%s, newVal=%s]";
+                    
walRebalanceThreshold.addListener(makeUpdateListener(logMsgFmt, log));
+
+                    dispatcher.registerProperties(walRebalanceThreshold);
+                }
+
+                @Override public void onReadyToWrite() {
+                    setDefaultValue(walRebalanceThreshold, 
walRebalanceThresholdLegacy, log);

Review comment:
       Please add log message about setting the default value, and what value 
it is.

##########
File path: 
modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerPropertiesTest.java
##########
@@ -197,4 +199,45 @@ public void testPropertyDefaultQueryTimeout() {
             )
         );
     }
+
+    /**
+     * Check the set command for property 'wal.rebalance.threshold'.
+     */
+    @Test
+    public void testPropertyWalRebalanceThreshold() {
+        assertDistributedPropertyEquals(WAL_REBALANCE_THRESHOLD_DMS_KEY, 
DFLT_PDS_WAL_REBALANCE_THRESHOLD, true);
+
+        int newVal = 1000;
+
+        assertEquals(
+            EXIT_CODE_OK,
+            execute(
+                "--property", "set",
+                "--name", "wal.rebalance.threshold",
+                "--val", Integer.toString(newVal)
+            )
+        );
+
+        assertDistributedPropertyEquals(WAL_REBALANCE_THRESHOLD_DMS_KEY, 
newVal, true);
+    }
+
+    /**
+     * Validates that distributed property has specified value across all 
nodes.
+     * @param propName Distributed property name.
+     * @param expected Expected property value.
+     * @param <T> Property type.
+     */

Review comment:
       Please add empty line before paramerters description and a description 
for `onlyServerMode`.




-- 
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:
[email protected]


Reply via email to