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

Moving larger trees cause OutOfMemoryError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.7
    • core, mk
    • None

    Description

      LargeMoveTest.moveTest test runs out of heap space when moving roughly 100000 nodes (128M heap):

      java.lang.OutOfMemoryError: Java heap space
      	at java.util.Arrays.copyOf(Arrays.java:2786)
      	at java.lang.StringCoding.safeTrim(StringCoding.java:64)
      	at java.lang.StringCoding.access$300(StringCoding.java:34)
      	at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:251)
      	at java.lang.StringCoding.encode(StringCoding.java:272)
      	at java.lang.String.getBytes(String.java:946)
      	at org.apache.jackrabbit.mk.util.IOUtils.writeString(IOUtils.java:84)
      	at org.apache.jackrabbit.mk.store.BinaryBinding.writeMap(BinaryBinding.java:98)
      	at org.apache.jackrabbit.mk.model.ChildNodeEntriesMap.serialize(ChildNodeEntriesMap.java:196)
      	at org.apache.jackrabbit.mk.model.AbstractNode.serialize(AbstractNode.java:169)
      	at org.apache.jackrabbit.mk.persistence.InMemPersistence.writeNode(InMemPersistence.java:76)
      	at org.apache.jackrabbit.mk.store.DefaultRevisionStore.putNode(DefaultRevisionStore.java:276)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:568)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:563)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:563)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:563)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:563)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:563)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree$StagedNode.persist(StagedNodeTree.java:563)
      	at org.apache.jackrabbit.mk.model.StagedNodeTree.persist(StagedNodeTree.java:80)
      	at org.apache.jackrabbit.mk.model.CommitBuilder.doCommit(CommitBuilder.java:126)
      	at org.apache.jackrabbit.mk.model.CommitBuilder.doCommit(CommitBuilder.java:94)
      	at org.apache.jackrabbit.mk.core.MicroKernelImpl.commit(MicroKernelImpl.java:496)
      	at org.apache.jackrabbit.oak.kernel.KernelNodeStoreBranch.commit(KernelNodeStoreBranch.java:178)
      	at org.apache.jackrabbit.oak.kernel.KernelNodeStoreBranch.setRoot(KernelNodeStoreBranch.java:78)
      	at org.apache.jackrabbit.oak.core.RootImpl.purgePendingChanges(RootImpl.java:355)
      	at org.apache.jackrabbit.oak.core.RootImpl.commit(RootImpl.java:234)
      	at org.apache.jackrabbit.oak.core.LargeMoveTest.moveTest(LargeMoveTest.java:78)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      

      This is caused by the inefficient rebase implementation in oak-core as discussed at length in OAK-464.

      Attachments

        1. oak-548.patch
          3 kB
          Thomas Mueller

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: