Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10205

Evaluate and reduce BlockCache store failures

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      The BlockCache is written such that requests to cache a block (BlockCache.store call) can fail, making caching less effective. We should evaluate the impact of this storage failure and potentially reduce the number of storage failures.

      The implementation reserves a single block of memory. In store, a block of memory is allocated, and then a pointer is inserted into the underling map. A block is only freed when the underlying map evicts the map entry.
      This means that when two store() operations are called concurrently (even under low load), one can fail. This is made worse by the fact that concurrent maps typically tend to amortize the cost of eviction over many keys (i.e. the actual size of the map can grow beyond the configured maximum number of entries... both the older ConcurrentLinkedHashMap and newer Caffeine do this). When this is the case, store() won't be able to find a free block of memory, even if there aren't any other concurrently operating stores.

        Attachments

        1. SOLR-10205.patch
          3 kB
          Yonik Seeley
        2. cache_performance_test.txt
          33 kB
          Yonik Seeley
        3. SOLR-10205.patch
          34 kB
          Yonik Seeley
        4. SOLR-10205.patch
          32 kB
          Yonik Seeley

          Activity

            People

            • Assignee:
              yseeley@gmail.com Yonik Seeley
              Reporter:
              yseeley@gmail.com Yonik Seeley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: