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

RepositoryUpgrade leads to one large commit with DocumentNodeStore causing OOM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.20
    • 1.0
    • mongomk, upgrade
    • None

    Description

      RepositoryUpgrade logic currently creates when migrating content from JR2 to Oak currently creates a one large commit. This causes issue with DocumentNodeStore as all the commit state is maintained in memory in Commit#operations variable which leads to OOM when source repository content is large.

      On Analyzing the heap dump it can be seen that o.a.j.o.plugins.document.Commit#operations map contains large number of UpdateOp entries. These entries are created due to the diff being performed in o.a.j.o.plugins.document.DocumentNodeStoreBranch#persist which traverse down the whole tree (source being JR2 tree) and captures the diff as UpdateOp. As commit does not get applied till whole diff is complete the in memory state is proportional to repository size

      Attachments

        1. OAK-1760-1_0-branch.patch
          4 kB
          Chetan Mehrotra
        2. 0001-OAK-1760-RepositoryUpgrade-leads-to-one-large-commit.patch
          2 kB
          Jukka Zitting
        3. 0001-OAK-1760-RepositoryUpgrade-leads-to-one-large-commit.patch
          2 kB
          Jukka Zitting
        4. OAK-1760.patch
          2 kB
          Chetan Mehrotra

        Issue Links

          Activity

            People

              jukkaz Jukka Zitting
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: