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

Michael McCandless commented on LUCENE-4638:
--------------------------------------------

I don't think we should rush a fix here.

Let's see if rollback would have fixed it (and really javadocs should state 
that as the "recovery" if you hit exc during close), and let's understand what 
was hanging in the 2nd call to IW.close.

I think a new forceUnluck method in IndexWriter is too dangerous because the 
IndexWriter technically is still open so the app can continue to do ops after 
releasing the lock.

                
> If IndexWriter is interrupted on close and is using a channel (mmap/nio), it 
> can throw a ClosedByInterruptException and prevent you from opening a new 
> IndexWriter in the same proceses if you are using Native locks.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4638
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4638
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Priority: Minor
>             Fix For: 4.1, 5.0
>
>         Attachments: LUCENE-4638.patch
>
>
> The ClosedByInterruptException will prevent the index from being unlocked in 
> close. If you try and close again, the call will hang. If you are using 
> native locks and try to open a new IndexWriter, it will fail to get the lock. 
> If you try IW#forceUnlock, it wont work because the not fully closed IW will 
> still have the lock.
> ideas:
> * On ClosedByInterruptException, IW should continue trying to close what it 
> can and unlock the index? Generally I have see the exception trigger in 
> commitInternal.
> * We should add a non static forceUnlock to IW that lets you remove the lock 
> and start a new IW?
> * We should make the lock protected so IW sub classes could unlock the index 
> in advanced use cases?
> * others?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to