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

Michael McCandless commented on LUCENE-5362:
--------------------------------------------

It's somewhat crazy for an app to be closing AND trying to reopen at the same 
time (i.e. results can be "unpredictable", just like in IW), but I agree we 
should make a best effort here if the code changes are minor.

I think we can just change incRef to call tryIncRef, and then throw ACE if 
tryIncRef returns false?

> IndexReader and friends should check ref count when incrementing
> ----------------------------------------------------------------
>
>                 Key: LUCENE-5362
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5362
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 4.6
>            Reporter: Simon Willnauer
>             Fix For: 5.0, 4.7
>
>
> IndexReader and SegmentCoreReaders blindly increments it's refcount which 
> could already be counted down to 0 which might allow an IndexReader  to "rise 
> from the dead" and use an already closed SCR instance. Even if that is caught 
> we should try best effort to raise ACE asap.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to