Details

    • Complexity:
      Low
    • Sprint:
      Soldevelo Sprint 1

      Description

      It is possible that when the server crashes, index lock files are not deleted. We need to delete them when starting OpenMRS or use a different locking mechanism.

      org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@/usr/share/tomcat7/.OpenMRS/lucene/indexes/org.openmrs.ConceptDatatype/write.lock
      	at org.apache.lucene.store.Lock.obtain(Lock.java:84)
      	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1097)
      	at org.hibernate.search.backend.Workspace.createNewIndexWriter(Workspace.java:202)
      	at org.hibernate.search.backend.Workspace.getIndexWriter(Workspace.java:175)
      	at org.hibernate.search.backend.Workspace.getIndexWriter(Workspace.java:210)
      	at org.hibernate.search.backend.impl.batchlucene.DirectoryProviderWorkspace.doWorkInSync(DirectoryProviderWorkspace.java:96)
      	at org.hibernate.search.backend.impl.batchlucene.LuceneBatchBackend$SyncBatchPerDirectoryWorkProcessor.addWorkToDpProcessor(LuceneBatchBackend.java:139)
      	at org.hibernate.search.backend.impl.lucene.DpSelectionVisitor$PurgeAllSelectionDelegate.addAsPayLoadsToQueue(DpSelectionVisitor.java:119)
      	at org.hibernate.search.backend.impl.batchlucene.LuceneBatchBackend.sendWorkToShards(LuceneBatchBackend.java:119)
      	at org.hibernate.search.backend.impl.batchlucene.LuceneBatchBackend.doWorkInSync(LuceneBatchBackend.java:80)
      	at org.hibernate.search.batchindexing.BatchCoordinator.beforeBatch(BatchCoordinator.java:153)
      	at org.hibernate.search.batchindexing.BatchCoordinator.run(BatchCoordinator.java:96)
      	at org.hibernate.search.impl.MassIndexerImpl.startAndWait(MassIndexerImpl.java:203)
      	at org.openmrs.api.db.hibernate.HibernateContextDAO.updateSearchIndex(HibernateContextDAO.java:471)
      	at org.openmrs.api.db.hibernate.HibernateContextDAO.setupSearchIndex(HibernateContextDAO.java:463)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      	at $Proxy511.setupSearchIndex(Unknown Source)
      	at org.openmrs.api.context.Context.startup(Context.java:830)
      	at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1563)
      	at java.lang.Thread.run(Thread.java:679)
      

        Attachments

          Activity

            People

            Assignee:
            raff Rafal Korytkowski
            Reporter:
            raff Rafal Korytkowski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Time Spent - 30 minutes Remaining Estimate - 1 hour, 30 minutes
                1h 30m
                Logged:
                Time Spent - 30 minutes Remaining Estimate - 1 hour, 30 minutes
                30m