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] [Resolved] (OAK-3098) CopyOnWrite might block Async indexer thread indefinitely
Date Wed, 15 Jul 2015 11:37:05 GMT

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

Chetan Mehrotra resolved OAK-3098.
----------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 1.2.4)
                   1.2.3

Fixed by ensuring that when oak-lucene bundle gets restarted it closes the IndexCopier and
which in turn prevent any further task from being added to queue. Further the latch is now
awaited with a timeout which should further prevent any such occurance
* trunk - http://svn.apache.org/r1691167
* 1.0 - http://svn.apache.org/r1691168
* 1.2 - http://svn.apache.org/r1691172

> 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.3, 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