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

Offline compaction uses too much memory

    XMLWordPrintableJSON

Details

    Description

      Using offline compaction on a repository with nodes having many direct child node I observed a steady increase of heap usage. This is cause by using a MemoryNodeBuilder in CompactDiff.childNodeAdded(), which causes all those child nodes to be cached in memory.

      Changing the line

      child = EMPTY_NODE.builder();
      

      to

      child = writer.writeNode(EMPTY_NODE).builder();
      

      fixes the problem as the latter returns a SegmentNodeBuilder where the former returns a MemoryNodeBuilder.

      Attachments

        Issue Links

          Activity

            People

              mduerig Michael Dürig
              mduerig Michael Dürig
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: