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 "Julian Reschke (JIRA)" <ji...@apache.org> on 2018/11/08 09:03:00 UTC

[jira] [Commented] (OAK-7709) DocumentNodeStore dispose aborts when store was disposed due to LeaseUpdate error

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

Julian Reschke commented on OAK-7709:
-------------------------------------

....just tried to backport to 1.8, merges cleanly, but test setup fails with:

{noformat}
[ERROR] Failures:
[ERROR]   DocumentNodeStoreTest.disposeAfterLeaseFailure:785 expected lease failure exception; test setup may be incorrect
{noformat}

[~mreutegg] - any idea why it's not throwing in 1.8? Use of clock? Different exception handling?

> DocumentNodeStore dispose aborts when store was disposed due to LeaseUpdate error
> ---------------------------------------------------------------------------------
>
>                 Key: OAK-7709
>                 URL: https://issues.apache.org/jira/browse/OAK-7709
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>    Affects Versions: 1.8.2
>         Environment: * Linux
> * IBM JDK 8
>            Reporter: Jörg Hoh
>            Assignee: Julian Reschke
>            Priority: Major
>              Labels: candidate_oak_1_8
>             Fix For: 1.10, 1.9.9
>
>         Attachments: OAK-7709.diff, OAK-7709.diff
>
>
> During a maintenance of our database system the DocumentNodeStore bundle shut down because of a lease timeout. When we restart the bundle, we ran into these exceptions:
> {code}
> 16.08.2018 11:32:44.139 *INFO* [Default Executor-thread-20544] org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService Configuring persistent cache to only cache nodes under paths [/libs, /apps, /jcr:system/jcr:nodeTypes, /jcr:system/rep:namespaces]
> 16.08.2018 11:32:44.155 *INFO* [Default Executor-thread-20544] org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache start, url=/opt/aem/repository/sling/_cqa/cache,size=2048,binary=0
> 16.08.2018 11:32:44.156 *WARN* [Default Executor-thread-20544] org.apache.jackrabbit.oak.plugins.document.persistentCache.MapFactory Error in the background thread of the persistent cache: java.lang.IllegalStateException: The file is locked: nio:/opt/aem/repository/sling/_cqa/cache/cache-0.data [1.4.194/7]
> 16.08.2018 11:32:44.157 *WARN* [Default Executor-thread-20544] org.apache.jackrabbit.oak.plugins.document.persistentCache.MapFactory Could not open the store /opt/aem/repository/sling/_cqa/cache/cache-0.data
> java.lang.IllegalStateException: The file is locked: nio:/opta/aem/repository/sling/_cqa/cache/cache-0.data [1.4.194/7]
> at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765)
> at org.h2.mvstore.FileStore.open(FileStore.java:168)
> at org.h2.mvstore.MVStore.<init>(MVStore.java:347)
> at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2930)
> at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache$1.openStore(PersistentCache.java:288)
> at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.createMapFactory(PersistentCache.java:361)
> at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.<init>(PersistentCache.java:210)
> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.getPersistentCache(DocumentNodeStoreBuilder.java:648)
> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.buildCache(DocumentNodeStoreBuilder.java:627)
> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.buildDocumentCache(DocumentNodeStoreBuilder.java:586)
> at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder.buildNodeDocumentCache(DocumentNodeStoreBuilder.java:594)
> at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.initialize(RDBDocumentStore.java:967)
> {code}
> It seems that the mvstore wasn't shut down properly during the stop of the DocumentNodeStore. For me it seems that the DocumentNodeStore doesn't use the persistent cache anymore until there was a "hard" restart (on the JVM).
> It would be good if even in this situation the shutdown of the DocumentNodeStore could drop the lock on the mvstore, so a clean restart of the bundle is possible.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)