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

SegmentIdTable too eager to refresh

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.13, 1.1.8
    • segmentmk
    • None

    Description

      Calling SegmentIdTable#getSegmentId might trigger a reference table refresh if a certain condition is met, I think that this condition is too eager to trigger the refresh and in high write scenarios, this results in large pauses as the method is synchronized.

      The current condition resembles a cache miss (index != first) which means that when looking up a segment id by the lsb it might happen that it either

      • is not there, so it needs to be added (no refresh on this branch)
      • or there is an overlap on lsb values (actually on the value returned by getIndex(lsb)), in which case a refresh will be triggered.

      In high write scenarios the refresh case happens a lot more frequently so a refresh is triggered, even if it might not be needed. a refresh makes sense when there are null references and it might make sense for them to be collected otherwise we're just creating clones of the same map over and over again.

      Attachments

        1. OAK-2654.patch
          1 kB
          Alex Deparvu

        Activity

          People

            stillalex Alex Deparvu
            stillalex Alex Deparvu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: