michaeljmarshall commented on code in PR #19505:
URL: https://github.com/apache/pulsar/pull/19505#discussion_r1107373967


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java:
##########
@@ -96,6 +102,17 @@ public abstract class PulsarWebResource {
 
     private static final Logger log = 
LoggerFactory.getLogger(PulsarWebResource.class);
 
+    private static final LoadingCache<String, PulsarServiceNameResolver> 
SERVICE_NAME_RESOLVER_CACHE =
+            
Caffeine.newBuilder().expireAfterWrite(Duration.ofMinutes(5)).build(

Review Comment:
   Shouldn't we expire based on access? If we expire after write, we could 
still get into the flaky edge case, when the cached `PulsarServiceNameResolver` 
gets refreshed.



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