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 2019/04/23 23:13:49 UTC
[GitHub] [pulsar] rdhabalia commented on a change in pull request #4066:
Allow to configure the managed ledger cache eviction frequency
rdhabalia commented on a change in pull request #4066: Allow to configure the managed ledger cache eviction frequency
URL: https://github.com/apache/pulsar/pull/4066#discussion_r277903192
##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
##########
@@ -139,6 +141,8 @@ private ManagedLedgerFactoryImpl(BookKeeper bookKeeper, boolean isBookkeeperMana
this.mbean = new ManagedLedgerFactoryMBeanImpl(this);
this.entryCacheManager = new EntryCacheManager(this);
this.statsTask = scheduledExecutor.scheduleAtFixedRate(() -> refreshStats(), 0, StatsPeriodSeconds, TimeUnit.SECONDS);
+ this.cacheEvictionTask = scheduledExecutor.scheduleAtFixedRate(() -> cacheEviction(), 0,
+ (long) (1000 / config.getCacheEvictionFrequency()), TimeUnit.MILLISECONDS);
Review comment:
`1000 / Math.min(config.getCacheEvictionFrequency(), 1000)`
----------------------------------------------------------------
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
With regards,
Apache Git Services