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

Offline compaction uses too much memory

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

            • Assignee:
              mduerig Michael Dürig
              Reporter:
              mduerig Michael Dürig

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment