You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/05/20 11:20:07 UTC

[GitHub] [ignite] Erixonich commented on a change in pull request #9110: IGNITE-14728 Change IGNITE_PDS_WAL_REBALANCE_THRESHOLD from System property to Distributed property

Erixonich commented on a change in pull request #9110:
URL: https://github.com/apache/ignite/pull/9110#discussion_r636008941



##########
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:
       there is an attached to the property on-update listener.
   Watch lines above:
   ```
   String logMsgFmt = "Historical rebalance WAL threshold [property=%s] changed[oldVal=%s, newVal=%s]";
   walRebalanceThreshold.addListener(makeUpdateListener(logMsgFmt, log));
   ```




-- 
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:
users@infra.apache.org