EdColeman commented on code in PR #2778:
URL: https://github.com/apache/accumulo/pull/2778#discussion_r900549173
##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/PropCacheCaffeineImpl.java:
##########
@@ -52,8 +54,8 @@ public class PropCacheCaffeineImpl implements PropCache {
private PropCacheCaffeineImpl(final
CacheLoader<PropStoreKey<?>,VersionedProperties> cacheLoader,
final PropStoreMetrics metrics, final Ticker ticker, boolean
runTasksInline) {
this.metrics = metrics;
- var builder = Caffeine.newBuilder().refreshAfterWrite(REFRESH_MIN,
BASE_TIME_UNITS)
- .expireAfterAccess(EXPIRE_MIN,
BASE_TIME_UNITS).evictionListener(this::evictionNotifier);
+ var builder = Caffeine.newBuilder().expireAfterAccess(EXPIRE_MIN,
BASE_TIME_UNITS)
+ .evictionListener(this::evictionNotifier);
Review Comment:
refreshAfterWrite() - when an entry exceeds this value, the current value is
returned and then an async task runs to determine if the entry is still valid.
This was implemented as a light weight check using the ZooKeeper stat. This
would be an effective way to keep configs up to date, but requires frequent
cache accesses to trigger. With the data version / snapshot caching, there may
not be enough calls to make refreshAfterWrite() as effective - these changes
replicate that behavior with an scheduled refresh task to bound the
synchronization.
--
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]