You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2016/04/05 10:26:25 UTC
[jira] [Resolved] (OAK-4171) Getting OakMerge0001 while posting
assets
[ https://issues.apache.org/jira/browse/OAK-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Reutegger resolved OAK-4171.
-----------------------------------
Resolution: Incomplete
Many of the fixed issues are unrelated to caching and may cause the reported conflicts even without using the persistent cache. I strongly suggest to use a stable release. If you still run into a problem, e.g. with the most recent stable 1.4.1 release, then please provide steps to reproduce.
> Getting OakMerge0001 while posting assets
> -----------------------------------------
>
> Key: OAK-4171
> URL: https://issues.apache.org/jira/browse/OAK-4171
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: jcr
> Affects Versions: 1.3.2
> Reporter: Soumya J Banerjee
> Priority: Trivial
>
> JackRabbit OAK – 1.3.2
> Mongo Persistence – 3.0
> Issue
> While publishing assets to Oak through the HTTP interface, the publish fails intermittently with the following error:
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------
> org.apache.jackrabbit.oak.api.CommitFailedException: OakMerge0001: OakMerge0001: Failed to merge changes to the underlying store (retries 5, 3740 ms) at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:239) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:179) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:158) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1495) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:247) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:258) ~[custom_oak.jar:na] at xxx.xxx.xxx.xxxcontentrepo.service.CustomCRUDService.createOrUpdate(CustomCRUDService.java:105) ~[custom_oak.jar:na] at xxx.xxx.xxx.xxxcontentrepo.CustomOakServlet.doPost(CustomOakServlet.java:135) [custom_oak.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) [custom_oak.jar:na] at org.apache.jackrabbit.oak.http.OakServlet.service(OakServlet.java:107) [custom_oak.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [custom_oak.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:594) [custom_oak.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1366) [custom_oak.jar:na] at xxx.xxx.xxx.xxxcontentrepo.filter.ResponseTimeLogFilter.doFilter(ResponseTimeLogFilter.java:36) [custom_oak.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337) [custom_oak.jar:na] at xxx.xxx.xxx.xxxcontentrepo.filter.HealthCheckFilter.doFilter(HealthCheckFilter.java:41) [custom_oak.jar:na] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337) [custom_oak.jar:na] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484) [custom_oak.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) [custom_oak.jar:na] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413) [custom_oak.jar:na] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) [custom_oak.jar:na] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [custom_oak.jar:na] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [custom_oak.jar:na] at org.eclipse.jetty.server.Server.handle(Server.java:368) [custom_oak.jar:na] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) [custom_oak.jar:na] at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953) [custom_oak.jar:na] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014) [custom_oak.jar:na] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:953) [custom_oak.jar:na] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [custom_oak.jar:na] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [custom_oak.jar:na] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [custom_oak.jar:na] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [custom_oak.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [custom_oak.jar:na] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [custom_oak.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
> Caused by: org.apache.jackrabbit.oak.plugins.document.DocumentStoreException: The node 5:/ngp/asset/pages/html/TestPageForCAT.html was already added in revision
> r1533bcad3c7-0-5b, before
> r15373c9550a-0-64 at org.apache.jackrabbit.oak.plugins.document.Commit.checkConflicts(Commit.java:550) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.Commit.createOrUpdateNode(Commit.java:464) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:367) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:262) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.Commit.applyInternal(Commit.java:231) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.Commit.apply(Commit.java:216) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:329) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:299) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.access$300(DocumentNodeStoreBranch.java:52) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$InMemory.merge(DocumentNodeStoreBranch.java:545) ~[custom_oak.jar:na] at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge0(DocumentNodeStoreBranch.java:223) ~[custom_oak.jar:na] ... 34 common frames omitted
> ------------------------------------------------------------------------------------------------------------------------------------
> We tried to manually post the same asset manually to the same location, but it failed with the same error code. It doesn’t affect any other nodes i.e. other nodes can be created/updated and deleted without any problems. If we manually delete the node from mongo, then the new node can be created without any issues.
> Initial Analysis
> Initial doubt was that JCR that takes the responsibility of publishing the content into Mongo is somehow out of sync with the real data in there after deletion. And this cause this problem. We logged in into mongo shell using Oak-Mongo.js and searched for the document. We searched for the document by its location "/ngp/asset/pages/html/TestPageForCAT.html". The document was present in mongodb with all its revisions (though it did not say anything about any conflicts). We deleted the asset with all its descendant node. And after this, we were able to post and access the same document again.
> List of possible problems we considered
> We started looking for known Oak issues, that may lead to this situation. We came across quite a few logged issues that might lead to this situation and they have been addressed in other Oak releases. They are listed below for reference:
> https://issues.apache.org/jira/browse/OAK-3152
> https://issues.apache.org/jira/browse/OAK-3733
> https://issues.apache.org/jira/browse/OAK-3653
> https://issues.apache.org/jira/browse/OAK-3634
> Among them, https://issues.apache.org/jira/browse/OAK-3653 looked like the main cause that says that, in a multi clustered Oak environment, we may run into a situation where one node may contain stale cached data, and thus lead to merge failure. As we are using 1.3.2 version oak that is not supposed to be the stable release, this issue might still be present.
> We tried to disable the persistent cache and restart Oak without any cache allocation, but still the issue continued. This led us to the doubt that it might not be happening because of caching problem.
> I have seen quite a few questions in different forums around the same issue. But couldn't get a clear answer. Appreciate if you can help with some leads or ideas.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)