Description
Running org.apache.jackrabbit.oak.jcr.LargeOperationIT#largeMove, which moves large trees causes an OOME on the document node store:
Exception in thread "DocumentNodeStore background thread" java.lang.OutOfMemoryError: Java heap space at org.bson.io.PoolOutputBuffer.<init>(PoolOutputBuffer.java:224) at org.bson.BasicBSONDecoder.<init>(BasicBSONDecoder.java:499) at com.mongodb.DefaultDBDecoder.<init>(DefaultDBDecoder.java:43) at com.mongodb.DefaultDBDecoder$DefaultFactory.create(DefaultDBDecoder.java:32) at com.mongodb.DB.command(DB.java:262) at com.mongodb.DB.command(DB.java:244) at com.mongodb.DB.command(DB.java:301) at com.mongodb.DB.command(DB.java:199) at com.mongodb.DBCollection.findAndModify(DBCollection.java:392) at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.findAndModify(MongoDocumentStore.java:411) at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.createOrUpdate(MongoDocumentStore.java:433) at org.apache.jackrabbit.oak.plugins.document.ClusterNodeInfo.renewLease(ClusterNodeInfo.java:247) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.backgroundRenewClusterIdLease(DocumentNodeStore.java:1241) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.runBackgroundOperations(DocumentNodeStore.java:1214) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$BackgroundOperation.run(DocumentNodeStore.java:1570) at java.lang.Thread.run(Thread.java:695) Exception in thread "Attach Listener" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:325) at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:348) Caused by: java.lang.OutOfMemoryError: Java heap space at sun.misc.VMSupport.initAgentProperties(Native Method) at sun.misc.VMSupport.getAgentProperties(VMSupport.java:29) at sun.management.Agent.startAgent(Agent.java:130) at sun.management.Agent.agentmain(Agent.java:95) ... 6 more Agent failed to start! Exception in thread "TarMK flush thread: target/tar.1392132190842974000" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2734) at java.util.ArrayList.ensureCapacity(ArrayList.java:167) at java.util.ArrayList.add(ArrayList.java:351) at org.apache.jackrabbit.oak.cache.CacheLIRS.values(CacheLIRS.java:471) at org.apache.jackrabbit.oak.cache.CacheLIRS$1.values(CacheLIRS.java:1445) at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.flush(FileStore.java:206) at org.apache.jackrabbit.oak.plugins.segment.file.FileStore$1.run(FileStore.java:165) at java.lang.Thread.run(Thread.java:695) java.lang.OutOfMemoryError: Java heap space at java.nio.CharBuffer.wrap(CharBuffer.java:350) at java.nio.CharBuffer.wrap(CharBuffer.java:373) at java.lang.StringCoding$StringDecoder.decode(StringCoding.java:138) at java.lang.StringCoding.decode(StringCoding.java:173) at java.lang.String.<init>(String.java:443) at org.bson.BasicBSONDecoder$BSONInput.readUTF8String(BasicBSONDecoder.java:455) at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:155) at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:206) at org.bson.BasicBSONDecoder._decode(BasicBSONDecoder.java:79) at org.bson.BasicBSONDecoder.decode(BasicBSONDecoder.java:57) at com.mongodb.DefaultDBDecoder.decode(DefaultDBDecoder.java:61) at com.mongodb.Response.<init>(Response.java:83) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DBCursor._check(DBCursor.java:368) at com.mongodb.DBCursor._hasNext(DBCursor.java:459) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.query(MongoDocumentStore.java:311) at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.query(MongoDocumentStore.java:286) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.readChildDocs(DocumentNodeStore.java:681) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.readChildren(DocumentNodeStore.java:617) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$3.call(DocumentNodeStore.java:582) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore$3.call(DocumentNodeStore.java:579) at org.apache.jackrabbit.oak.cache.CacheLIRS$Segment.get(CacheLIRS.java:841) at org.apache.jackrabbit.oak.cache.CacheLIRS.get(CacheLIRS.java:212) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.getChildren(DocumentNodeStore.java:579) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.getChildNodes(DocumentNodeStore.java:741) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeState.getChildNodeEntries(DocumentNodeState.java:329)