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

Bottleneck in the asynchronous persistent cache

    XMLWordPrintableJSON

    Details

      Description

      The class responsible for accepting new cache operations which will be handled asynchronously is CacheActionDispatcher. In case of a high load, when the queue is full (=1024 entries), the add() method removes the oldest 256 entries. However, we can't afford losing the updates (as it may result in having stale entries in the cache), so all the removed entries are compacted into one big invalidate action.

      The compaction action (CacheActionDispatcher#cleanTheQueue) still holds the lock taken in add() method, so threads which tries to add something to the queue have to wait until cleanTheQueue() ends.

      Maybe we can optimise the CacheActionDispatcher#add->cleanTheQueue part, so it won't hold the lock for the whole time.

        Attachments

        1. OAK-4882.patch
          33 kB
          Tomek Rękawek

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                tomek.rekawek Tomek Rękawek
                Reporter:
                tomek.rekawek Tomek Rękawek
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: