[ https://issues.apache.org/jira/browse/OAK-8221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16816032#comment-16816032 ]
zhouxu commented on OAK-8221: ----------------------------- we can schedule revision garbage collection every night。 Is there an example of how to configure DocumentNodeStore for production environments? Is there an open source system using oak? We can refer to it. > Failure to do anything,throw CommitFailedException: OakMerge0004 > ---------------------------------------------------------------- > > Key: OAK-8221 > URL: https://issues.apache.org/jira/browse/OAK-8221 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core > Reporter: zhouxu > Priority: Major > > Hello expert: > 1. To use Oak in my project simply add a dependency to > {{org.apache.jackrabbit:oak-jcr:1.10.2}} and to {{javax.jcr:jcr:2.0。}} > 2. we construct a Repository instance,use mongodb like this: > MongoClient > mongoClient=getMongoClient(mongodbIP,mongodbPort,dbName,userName,password); > DocumentNodeStore documentNodeStore = newMongoDocumentNodeStoreBuilder() > .setMongoDB(mongoClient, dbName, 0) > .setBlobStore(new FileBlobStore("D:\\amberdata\\FileStore")) > .build(); > Repository repository = new Jcr(new > Oak(documentNodeStore)).createRepository(); > 3.Every developer uses the oak of a local application to connect to the same > mongodb, > A few days later,We failed to unregister node type dw_unit_detail which we > registered,it takes a long time,and throw CommitFailedException: > OakMerge0004,like this: > javax.jcr.InvalidItemStateException: Failed to unregister node type > dw_unit_detail > at > org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:240) > at > org.apache.jackrabbit.oak.plugins.nodetype.write.ReadWriteNodeTypeManager.unregisterNodeType(ReadWriteNodeTypeManager.java:186) > at com.datamber.afc.domain.type.AfType.destroy(AfType.java:397) > at com.datamber.afc.domain.type.AfTypeTest.destroy(AfTypeTest.java:345) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) > at > com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) > at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) > Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakMerge0004: > OakMerge0004: Following exceptions occurred during the bulk update > operations: [org.apache.jackrabbit.oak.plugins.document.ConflictException: > The node 3:/jcr:system/jcr:nodeTypes/dw_customize_type was changed in revision > r16a0699ff58-0-3 (not yet visible), which was applied after the base revision > r16a0b08f9b6-0-1,r16a067a0c76-0-2,r16a0699faf1-0-3,r16a072d9ee8-0-4,r16a069a45a1-0-5,r16a06874e87-0-6,r16a069be50a-0-7,r16a073313ba-0-8,r16a073e63ae-0-9,r16a0769307d-0-a,r16a0ae97b21-0-b,r16a0a0b1912-0-c,r16a0a0fa4e7-0-d,r16a0a4bbc67-0-e,r16a0a4438fc-0-f,r16a0ae19945-0-10, > before > r16a0b099334-0-1] (retries 5, 303136 ms) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:218) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:127) > at > org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:170) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1848) > at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:250) > at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:261) > at > org.apache.jackrabbit.oak.plugins.nodetype.write.ReadWriteNodeTypeManager.unregisterNodeType(ReadWriteNodeTypeManager.java:182) > ... 26 more > Caused by: org.apache.jackrabbit.oak.plugins.document.ConflictException: > Following exceptions occurred during the bulk update operations: > [org.apache.jackrabbit.oak.plugins.document.ConflictException: The node > 3:/jcr:system/jcr:nodeTypes/dw_customize_type was changed in revision > r16a0699ff58-0-3 (not yet visible), which was applied after the base revision > r16a0b08f9b6-0-1,r16a067a0c76-0-2,r16a0699faf1-0-3,r16a072d9ee8-0-4,r16a069a45a1-0-5,r16a06874e87-0-6,r16a069be50a-0-7,r16a073313ba-0-8,r16a073e63ae-0-9,r16a0769307d-0-a,r16a0ae97b21-0-b,r16a0a0b1912-0-c,r16a0a0fa4e7-0-d,r16a0a4bbc67-0-e,r16a0a4438fc-0-f,r16a0ae19945-0-10, > before > r16a0b099334-0-1] > at > org.apache.jackrabbit.oak.plugins.document.Commit.checkConflicts(Commit.java:632) > at > org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:333) > at > org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:252) > at > org.apache.jackrabbit.oak.plugins.document.Commit.applyInternal(Commit.java:220) > at org.apache.jackrabbit.oak.plugins.document.Commit.apply(Commit.java:208) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:310) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:275) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.access$500(DocumentNodeStoreBranch.java:55) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$InMemory.merge(DocumentNodeStoreBranch.java:531) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:194) > ... 32 more -- This message was sent by Atlassian JIRA (v7.6.3#76005)