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

Improve FileStore.size calculation

    XMLWordPrintableJSON

    Details

      Description

      A new approach for calculating FileStore::size is needed because this method is prone to lock contention and should not be called too often.

      The steps to implement the approach are:

      1. reduce the lock surface of the size() method. This should be simple enough by creating a copy of the readers / writer inside the lock and do the actual size calculation on that snapshot but outside of the lock.
      2. lower size() visibility to package to avoid misuse (from monitoring tools)
      3. remove approximateSize and associated logic and replace it with size().

        Attachments

        1. OAK-4579-01.patch
          24 kB
          Andrei Dulceanu

          Activity

            People

            • Assignee:
              adulceanu Andrei Dulceanu
              Reporter:
              adulceanu Andrei Dulceanu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: