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

SegmentMk StringCache memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.15, 1.4
    • segmentmk
    • None

    Description

      The StringCache is made of 2 components: a FastCache and a Lirs Cache and both caches use the same key object 'StringCacheEntry' with the condition that the FastCache contains the string value itself with the key while the Lirs Cache will only contain the msb, lsb and offset.
      Sharing the same key leads to issues when a value qualifies for both caches as it results in the string value ending up contained in the Lirs Cache, effectively blowing up the cache's size. [0]
      On a test I ran I noticed the Lirs Cache going up to 800mb even though it was configured at 256mb.

      [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/StringCache.java#L86

      Attachments

        1. CacheLIRS-Entry-heap.png
          278 kB
          Alex Deparvu
        2. OAK-3889-v2.patch
          6 kB
          Alex Deparvu
        3. StringCache.java.patch
          2 kB
          Alex Deparvu

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: