Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6413

FileCache getIfPresent doesn't update cache hit/miss counters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7.4, 1.6.3, 1.8.0
    • Component/s: blob
    • Labels:
      None

      Description

      FileCache.getIfPresent bypasses cache access if key is not in cache and CacheStats for "DataStore-DownloadCache" MBean will always have 100% hit rate even when Blobs will be downloaded from the BlobStore backend by AbstractSharedCachingDataStore because of the miss in the cache.

      I suggest the following change:
      FileCache.getIfPresent to call CacheLIRS.getIfPresent which will update the cache stats (miss and hit counters).

        Attachments

          Activity

            People

            • Assignee:
              amitjain Amit Jain
              Reporter:
              ioancris Ioan-Cristian Linte
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: