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

Bottleneck in the asynchronous persistent cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.8, 1.5.10
    • 1.4.10, 1.5.13, 1.6.0
    • cache, documentmk
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: