jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-3057) Simplify debugging conflict related errors
Date Thu, 09 Jul 2015 10:48:07 GMT

    [ https://issues.apache.org/jira/browse/OAK-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14620265#comment-14620265
] 

Chetan Mehrotra edited comment on OAK-3057 at 7/9/15 10:47 AM:
---------------------------------------------------------------

bq. I suggest leaving this issue here, and creating followup issues for different scenarios
that may arise next

Makes sense. May be we add it to docs.

h3. Usage

Enable logs for following categories to see the conflict related logging
* org.apache.jackrabbit.oak.plugins.commit.MergingNodeStateDiff
* org.apache.jackrabbit.oak.plugins.commit.ConflictValidator

Post this you would see logs like below
{noformat}
16:16:42.326 DEBUG [pool-1-thread-1] MergingNodeStateDiff.java:118  NodeConflictHandler<DELETE_CHANGED_NODE>
resolved conflict of type DELETE_CHANGED_NODE with resolution THEIRS on node jcr:content,
conflict trace ^"/metadata/updated":"myself"
16:16:42.336 DEBUG [pool-1-thread-1] ConflictValidator.java:134  Commit failed due to unresolved
conflicts in /node = {deleteChangedNode = {jcr:content}}
org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in
/node
	at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:127)
[classes/:na]
{noformat}


was (Author: chetanm):
bq. I suggest leaving this issue here, and creating followup issues for different scenarios
that may arise next

Makes sense. May be we add it to docs.

h3. Usage

Enable logs for following categories to see the conflict related logging
* org.apache.jackrabbit.oak.plugins.commit.MergingNodeStateDiff
* org.apache.jackrabbit.oak.plugins.commit.ConflictValidator

Post this you would see logs like below
{noformat}
15:49:47.343 DEBUG [pool-1-thread-1] MergingNodeStateDiff.java:118  NodeConflictHandler<DELETE_CHANGED_NODE>
resolved conflict of type DELETE_CHANGED_NODE with resolution THEIRS, conflict trace ^"/metadata/updated":"myself"
15:49:47.349 DEBUG [pool-1-thread-1] ConflictValidator.java:134  Commit failed due to unresolved
conflicts in /node = {deleteChangedNode = {jcr:content}}
org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in
/node
	at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:127)
[classes/:na]
	at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyAdded(ConflictValidator.java:96)
[classes/:na]
{noformat}

> Simplify debugging conflict related errors
> ------------------------------------------
>
>                 Key: OAK-3057
>                 URL: https://issues.apache.org/jira/browse/OAK-3057
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Chetan Mehrotra
>             Fix For: 1.3.3
>
>         Attachments: OAK-3057-v0.patch, OAK-3057-v1.patch, OAK-3057-v2.patch
>
>
> Many a times we see conflict exception in the logs like below. Looking at the stacktrace
its hard to reason out what was the conflict and hence harder to debug such issues. Oak should
provide more details as part of exception message itself to simplify debugging such issues.

> Note that such issues are intermittent and might happen in background processing logic.
So its required that all details should be made part of exception message itself as it would
not be possible to turn on any trace logging to get more details given the intermittent nature
of such issues
> {noformat}
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved
conflicts in /content/dam/news/images/2015/06/27/blue-sky.jpg
> 	at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:84)
> 	at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyAdded(ConflictValidator.java:54)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyAdded(CompositeEditor.java:83)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyAdded(EditorDiff.java:82)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:375)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)
> 	at org.apache.jackrabbit.oak.plugins.memory.ModifiedNodeState.compareAgainstBaseState(ModifiedNodeState.java:396)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
> 	at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60)
> 	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:60)
> 	at org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch$InMemory.merge(AbstractNodeStoreBranch.java:557)
> 	at org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch.merge0(AbstractNodeStoreBranch.java:329)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:148)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:159)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1482)
> 	at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:247)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message