lordcheng10 commented on a change in pull request #13679:
URL: https://github.com/apache/pulsar/pull/13679#discussion_r825569028



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -2233,6 +2263,13 @@ private void updateBrokerPublisherThrottlingMaxRate() {
         }
     }
 
+    private void updateCacheSizeAndThreshold(long maxSize) {
+        ManagedLedgerFactoryImpl managedLedgerFactory = 
(ManagedLedgerFactoryImpl) pulsar().getManagedLedgerFactory();
+        double thresholdPercent = 
managedLedgerFactory.getEntryCacheManager().getEvictionTriggerThresholdPercent();
+        managedLedgerFactory.getEntryCacheManager().setMaxSize(maxSize);

Review comment:
       Fixed

##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/EntryCacheManager.java
##########
@@ -45,9 +47,12 @@
 @SuppressWarnings("checkstyle:javadoctype")
 public class EntryCacheManager {
 
-    private final long maxSize;
-    private final long evictionTriggerThreshold;
-    private final double cacheEvictionWatermark;
+    @Setter
+    private volatile long maxSize;
+    @Setter

Review comment:
       Fixed




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