accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ben-manes <>
Subject [GitHub] accumulo pull request #251: ACCUMULO-4626 added weak reference value map for...
Date Wed, 26 Apr 2017 05:31:46 GMT
Github user ben-manes commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/
    @@ -68,7 +73,10 @@ public long getMaxSize() {
       public CacheEntry getBlock(String blockName) {
    -    return cache.getIfPresent(blockName);
    +    CacheEntry ce = cache.getIfPresent(blockName);
    +    if (ce != null)
    +      return ce;
    +    return weakEvictionMap.get(blockName);
    --- End diff --
    You might prefer to promote the entry using a CacheLoader. Otherwise your recovery of
a premature eviction would still allow the entry to be collected eventually.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message