[ 
https://issues.apache.org/jira/browse/LUCENE-1555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680888#action_12680888
 ] 

Michael McCandless commented on LUCENE-1555:
--------------------------------------------


bq. I've changed only IndexWriter.close() to IndexWriter.close(true). The true 
is correct.

But that's identical to IndexWriter.close(), which simply calls close(true).

bq. After some testing we couldn't reproduce the lock anymore. So I think it is 
solved with this change.

I don't see how it's possible calling close(true) resolved the issue;
it must be after more testing you'll see it's still there.  I'd really
like to get to the root cause.

bq. I'm not doing any external synchronization on IndexWriter myself. I expect 
that the IndexWriter is synchronized by itself.

Right, IndexWriter is fully thread-safe; I wanted to make sure you
don't have any of your own code that tries to do
synchronized(writer) {...}.

bq. Sure there are many threads running, but these are the only two threads, 
that have to do with the indexing.

Can you post all of the threads traces?

When you hit the deadlock, if you wait a few seconds and get the
thread traces again, have they changed?

Can you make this happen on a smallish test case?


> Deadlock while optimize
> -----------------------
>
>                 Key: LUCENE-1555
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1555
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4
>         Environment: ubuntu 8.04, java 1.6 update 07, Lucene 2.4.0
>            Reporter: Stefan Heidrich
>            Assignee: Michael McCandless
>
> Sometimes after starting the thread with the indexer, the thread will hang in 
> the following threads.
> Thread [Lucene Merge Thread #0] (Ausgesetzt)  
>       IndexWriter.commitMerge(MergePolicy$OneMerge, SegmentMerger, int) Line: 
> 3751    
>       IndexWriter.mergeMiddle(MergePolicy$OneMerge) Line: 4240        
>       IndexWriter.merge(MergePolicy$OneMerge) Line: 3877      
>       ConcurrentMergeScheduler.doMerge(MergePolicy$OneMerge) Line: 205        
>       ConcurrentMergeScheduler$MergeThread.run() Line: 260    
> Thread [Indexer] (Ausgesetzt) 
>       Object.wait(long) Line: not available [native Methode]  
>       IndexWriter.doWait() Line: 4491 
>       IndexWriter.optimize(int, boolean) Line: 2268   
>       IndexWriter.optimize(boolean) Line: 2203        
>       IndexWriter.optimize() Line: 2183       
>       Indexer.run() Line: 263 
> If you need more informations, please let me know.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to