merlimat opened a new pull request #12788:
URL: https://github.com/apache/pulsar/pull/12788


   ### Motivation
   
   When we're doing a write to the store from outside the `MetadataCache`, we 
are immediately invalidating the cache to ensure read-after-write consistency 
through the cache. 
   
   The only issue is that the invalidation, will not trigger a reloading of the 
value. Instead it is relying on the next call to `cache.get()` which will see 
the cache miss and it will load the new value into the cache.
   
   This means that calls `cache.getIfCached()`, which is not triggering a cache 
load, will keep seeing the key as missing.
   
   ### Modification
   
   Ensure we're calling refresh on the cache to get the value automatically 
reloaded in background and make sure the `getIfCached()` will eventually return 
the new value, even if there are no calls to `cache.get()`.


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