You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/28 08:48:09 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #14488: refactor ManagedLedger cacheEvictionTask implement

codelipenghui commented on a change in pull request #14488:
URL: https://github.com/apache/pulsar/pull/14488#discussion_r815678245



##########
File path: conf/broker.conf
##########
@@ -960,8 +960,8 @@ managedLedgerCacheCopyEntries=false
 # Threshold to which bring down the cache level when eviction is triggered
 managedLedgerCacheEvictionWatermark=0.9
 
-# Configure the cache eviction frequency for the managed ledger cache (evictions/sec)
-managedLedgerCacheEvictionFrequency=100.0
+# Configure the cache eviction interval for the managed ledger cache
+managedLedgerCacheEvictionIntervalMs=10

Review comment:
       The PR introduced a new configuration and deprecate an old configuration, it's better to discuss in the dev email list first.

##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -1685,7 +1685,14 @@
     private double managedLedgerCacheEvictionWatermark = 0.9;
     @FieldContext(category = CATEGORY_STORAGE_ML,
             doc = "Configure the cache eviction frequency for the managed ledger cache. Default is 100/s")
+    @Deprecated
     private double managedLedgerCacheEvictionFrequency = 100.0;
+
+    @FieldContext(category = CATEGORY_STORAGE_ML,
+            doc = "Configure the cache eviction interval for the managed ledger cache. Must >= 1 ms, "
+                    + " and default is 10 ms")
+    private long managedLedgerCacheEvictionIntervalMs = 10;
+

Review comment:
       Need to consider more about the compatibility
   
   The user might use the old one which means using a different value as the default value, but after upgrading to the new version, the default value will be applied, but we should apply the configured value  by users.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org