kwin commented on code in PR #786: URL: https://github.com/apache/jackrabbit-oak/pull/786#discussion_r1046951363
########## oak-doc/src/site/markdown/dos_and_donts.md: ########## @@ -130,3 +130,17 @@ c = d.getParent(); // preferred way to fetch the pa this is that Oak internally uses various classes from the `nio` package that implement `InterruptibleChannel`, which are [asynchronously closed](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/channels/InterruptibleChannel.html) when receiving an `InterruptedException` while blocked on IO. See [OAK-2609](https://issues.apache.org/jira/browse/OAK-2609). + +### Avoid or minimize conflicts +To reduce the possiblity of having errors like `OakState0001: Unresolved conflicts in ...`: + +1. Make sure you always release the session by calling session.logout(). If possible, avoid long-running sessions. If they are required (e.g. for observation) make sure +to always call session.refresh(false) before applying changes or session.refresh(true) before saving the changes. + +2. Enable the DEBUG level for `org.apache.jackrabbit.oak.plugins.commit.MergingNodeStateDiff` and `org.apache.jackrabbit.oak.plugins.commit.ConflictValidator` loggers if you want Review Comment: I don't think we should duplicate the info from https://jackrabbit.apache.org/oak/docs/FAQ.html#how-do-i-debug-merge-conflict-errors but rather add a link -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org