Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Repoinit JCR 1.1.32
-
None
Description
Due to some rare race condition we observed an InvalidItemStateException in repoinit. In such cases it makes sense to retry the operation up to 3 times (maybe with exponential backoff). Just throwing an exception and breaking the startup doesn't feel right.
[Apache Sling Repository Startup Thread #1] com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted java.lang.RuntimeException: Session.save failed: javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /home/groups/site at org.apache.sling.jcr.repoinit.impl.AclVisitor.visitCreatePath(AclVisitor.java:154) [org.apache.sling.jcr.repoinit:1.1.32] at org.apache.sling.repoinit.parser.operations.CreatePath.accept(CreatePath.java:48) [org.apache.sling.repoinit.parser:1.6.6] at org.apache.sling.jcr.repoinit.impl.JcrRepoInitOpsProcessorImpl.apply(JcrRepoInitOpsProcessorImpl.java:56) [org.apache.sling.jcr.repoinit:1.1.32] at org.apache.sling.jcr.repoinit.impl.RepositoryInitializerFactory.processRepository(RepositoryInitializerFactory.java:126) [org.apache.sling.jcr.repoinit:1.1.32] at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:610) [org.apache.sling.jcr.base:3.1.6] at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:558) [org.apache.sling.jcr.base:3.1.6] at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:92) [org.apache.sling.jcr.base:3.1.6] at org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:527) [org.apache.sling.jcr.base:3.1.6] Caused by: javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /home/groups/site at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:238) [org.apache.jackrabbit.oak-api:1.39.0.R1888564] at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:213) [org.apache.jackrabbit.oak-api:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:684) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:505) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:424) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:275) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:421) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] at com.adobe.granite.repository.impl.CRX3SessionImpl.save(CRX3SessionImpl.java:207) [com.adobe.granite.repository:1.6.126] at org.apache.sling.jcr.repoinit.impl.AclVisitor.visitCreatePath(AclVisitor.java:152) [org.apache.sling.jcr.repoinit:1.1.32] ... 7 common frames omitted Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /home/groups/site at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:115) [org.apache.jackrabbit.oak-core:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyAdded(ConflictValidator.java:84) [org.apache.jackrabbit.oak-core:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyAdded(CompositeEditor.java:82) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyAdded(EditorDiff.java:81) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:394) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:416) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:416) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:147) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.composite.CompositeNodeState$WrappingDiff.childNodeChanged(CompositeNodeState.java:309) [org.apache.jackrabbit.oak-store-composite:1.39.0.R1888564] at org.apache.jackrabbit.oak.composite.CompositeNodeState$ChildrenDiffFilter.childNodeChanged(CompositeNodeState.java:256) [org.apache.jackrabbit.oak-store-composite:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:416) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.ModifiedDocumentNodeState.compareAgainstBaseState(ModifiedDocumentNodeState.java:132) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.composite.CompositeNodeState.compareAgainstBaseState(CompositeNodeState.java:163) [org.apache.jackrabbit.oak-store-composite:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:51) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60) [org.apache.jackrabbit.oak-store-spi:1.39.0.R1888564] at org.apache.jackrabbit.oak.composite.CommitHookEnhancer.processCommit(CommitHookEnhancer.java:55) [org.apache.jackrabbit.oak-store-composite:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.TimingHook.processCommit(TimingHook.java:59) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$InMemory.merge(DocumentNodeStoreBranch.java:542) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:197) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:121) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:170) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1991) [org.apache.jackrabbit.oak-store-document:1.39.0.R1888564] at org.apache.jackrabbit.oak.composite.CompositeNodeStore.merge(CompositeNodeStore.java:151) [org.apache.jackrabbit.oak-store-composite:1.39.0.R1888564] at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:252) [org.apache.jackrabbit.oak-core:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:348) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:503) [org.apache.jackrabbit.oak-jcr:1.39.0.R1888564] ... 12 common frames omitted
Attachments
Issue Links
- links to