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 "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2016/12/05 14:47:58 UTC

[jira] [Resolved] (OAK-5216) AsyncIndexUpdate: CONCURRENT_UPDATE should contain relevant stacktrace

     [ https://issues.apache.org/jira/browse/OAK-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Parvulescu resolved OAK-5216.
----------------------------------
    Resolution: Fixed

fixed with http://svn.apache.org/viewvc?rev=1772684&view=rev

tested on an existing IT test, original stacktrace:
{noformat}
org.apache.jackrabbit.oak.api.CommitFailedException: OakAsync0001: Concurrent update detected
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.<clinit>(AsyncIndexUpdate.java:113)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest.testPreIndexUpdateLeaseExpired(AsyncIndexUpdateLeaseTest.java:189)
{noformat}

stacktrace with patch
{noformat}
org.apache.jackrabbit.oak.api.CommitFailedException: OakAsync0001: Concurrent update detected
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.newConcurrentUpdateException(AsyncIndexUpdate.java:1393)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.access$2(AsyncIndexUpdate.java:1392)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate$1.processCommit(AsyncIndexUpdate.java:772)
	at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)
	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:579)
	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:609)
	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:665)
	at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.merge(SegmentNodeStore.java:308)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.mergeWithConcurrencyCheck(AsyncIndexUpdate.java:785)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.access$3(AsyncIndexUpdate.java:757)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate$AsyncUpdateCallback.close(AsyncIndexUpdate.java:352)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest$SpecialAsyncUpdateCallback.close(AsyncIndexUpdateLeaseTest.java:488)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.updateIndex(AsyncIndexUpdate.java:729)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.runWhenPermitted(AsyncIndexUpdate.java:532)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:391)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest$SpecialAsyncIndexUpdate.run(AsyncIndexUpdateLeaseTest.java:447)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest.assertRun(AsyncIndexUpdateLeaseTest.java:416)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest.assertRunKo(AsyncIndexUpdateLeaseTest.java:411)
	at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdateLeaseTest.testPreIndexUpdateLeaseExpired(AsyncIndexUpdateLeaseTest.java:208)
{noformat}



> AsyncIndexUpdate: CONCURRENT_UPDATE should contain relevant stacktrace
> ----------------------------------------------------------------------
>
>                 Key: OAK-5216
>                 URL: https://issues.apache.org/jira/browse/OAK-5216
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.0.33
>            Reporter: Jörg Hoh
>            Assignee: Alex Parvulescu
>            Priority: Minor
>             Fix For: 1.6, 1.5.15
>
>         Attachments: OAK-5216.patch
>
>
> We are currently investigating problems regarding a failing AsyncIndexUpdate. The first error message starts like this:
> {noformat}
> 30.11.2016 11:05:04.172 *WARN* [pool-11-thread-5] org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate [async] The index update failed
> org.apache.jackrabbit.oak.api.CommitFailedException: OakAsync0001: Concurrent update detected
> at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.<clinit>(AsyncIndexUpdate.java:90)
> at org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:518)
> at com.adobe.granite.repository.impl.SlingRepositoryManager.createRepository(SlingRepositoryManager.java:357)
> at com.adobe.granite.repository.impl.SlingRepositoryManager.acquireRepository(SlingRepositoryManager.java:228)
> at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.start(AbstractSlingRepositoryManager.java:304)
> at com.adobe.granite.repository.impl.SlingRepositoryManager.activate(SlingRepositoryManager.java:205)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at <unknown class>.<unknown method>(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
> at java.lang.reflect.Method.invoke(Method.java:620)
> at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> {noformat}
> at that time the application was already running for some hours, this did not happen on startup!
> Also the code indicates, that the exception itself is created on creation of the AsyncIndexUpdate service, so the stacktrace does not give any insight under which condition the exception occurred at all. This should be changed in a way, that the stacktrace contains relevant information about the root cause of the exception.



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