From 45125a17e5f77a10bb8dcc2c2749df4114747cf4 Mon Sep 17 00:00:00 2001 From: lipenghui Date: Sat, 21 Nov 2020 10:02:37 +0800 Subject: [PATCH] [Branch-2.6] Fix cherry-pick issue between #8302 and #8304 (#8652) --- .../main/java/org/apache/pulsar/zookeeper/ZooKeeperCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/ZooKeeperCache.java b/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/ZooKeeperCache.java index 34b55a6c5a6dd..7f9b8d1c3583e 100644 --- a/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/ZooKeeperCache.java +++ b/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/ZooKeeperCache.java @@ -113,12 +113,12 @@ public ZooKeeperCache(String cacheName, ZooKeeper zkSession, int zkOperationTime 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);