Skip to content

Commit

Permalink
[pulsar-broker] fix: use correct configuration for zk-cache expire ti…
Browse files Browse the repository at this point in the history
…me (#8302)
  • Loading branch information
rdhabalia authored Oct 19, 2020
1 parent 52e441f commit d8f319e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@ public ZooKeeperCache(String cacheName, ZooKeeper zkSession, int zkOperationTime

this.dataCache = Caffeine.newBuilder()
.recordStats()
.expireAfterWrite(zkOperationTimeoutSeconds, TimeUnit.SECONDS)
.expireAfterWrite(cacheExpirySeconds, TimeUnit.SECONDS)
.buildAsync((key, executor1) -> null);

this.childrenCache = Caffeine.newBuilder()
.recordStats()
.expireAfterWrite(zkOperationTimeoutSeconds, TimeUnit.SECONDS)
.expireAfterWrite(cacheExpirySeconds, TimeUnit.SECONDS)
.buildAsync((key, executor1) -> null);

this.existsCache = Caffeine.newBuilder()
.recordStats()
.expireAfterWrite(zkOperationTimeoutSeconds, TimeUnit.SECONDS)
.expireAfterWrite(cacheExpirySeconds, TimeUnit.SECONDS)
.buildAsync((key, executor1) -> null);

CacheMetricsCollector.CAFFEINE.addCache(cacheName + "-data", dataCache);
Expand Down

0 comments on commit d8f319e

Please sign in to comment.