jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OAK-3098) CopyOnWrite might block Async indexer thread indefinitely
Date Mon, 13 Jul 2015 16:51:04 GMT
Chetan Mehrotra created OAK-3098:
------------------------------------

             Summary: CopyOnWrite might block Async indexer thread indefinitely
                 Key: OAK-3098
                 URL: https://issues.apache.org/jira/browse/OAK-3098
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: lucene
            Reporter: Chetan Mehrotra
            Assignee: Chetan Mehrotra
            Priority: Minor
             Fix For: 1.2.4, 1.3.3, 1.0.18


CopyOnWrite logic uses a CountDownLatch to sync up on close call. In case of config change
which might lead to closing of the the IndexCopier this latch might not be released causing
the async index thread to hang

{noformat}
      sun.misc.Unsafe.park(Native Method)
      java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
      java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
      java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236)
      org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier$CopyOnWriteDirectory.close(IndexCopier.java:648)
      org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditorContext.closeWriter(LuceneIndexEditorContext.java:196)
      org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:207)
      org.apache.jackrabbit.oak.plugins.index.IndexUpdate.leave(IndexUpdate.java:219)
      org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)
      org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:56)
      org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.updateIndex(AsyncIndexUpdate.java:366)
      org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:311)
      org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:105)
      org.quartz.core.JobRunShell.run(JobRunShell.java:207)
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      java.lang.Thread.run(Thread.java:745)
{noformat}

Ideally this latch should have a timeout or closing logic of IndexCopier ensures that this
is released



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

Mime
View raw message