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

Bottleneck in the asynchronous persistent cache

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.8, 1.5.10
    • Fix Version/s: 1.4.10, 1.5.13, 1.6.0
    • Component/s: cache, documentmk
    • Labels:
      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

        Issue Links

          Activity

            People

            • Assignee:
              tomek.rekawek Tomek Rękawek
              Reporter:
              tomek.rekawek Tomek Rękawek

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment