Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7709

DocumentNodeStore dispose aborts when store was disposed due to LeaseUpdate error

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.10.0, 1.9.9, 1.8.10
    • documentmk
    • None
      • Linux
      • IBM JDK 8

    Description

      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:

      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)
      

      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.

      Attachments

        1. OAK-7709.diff
          4 kB
          Julian Reschke
        2. OAK-7709.diff
          5 kB
          Julian Reschke

        Issue Links

          Activity

            People

              reschke Julian Reschke
              joerghoh Joerg Hoh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: