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

Michael McCandless commented on LUCENE-1314:
--------------------------------------------

bq. In my SegmentReader subclass I am passing a lock and passing a reference to 
fieldsReader for global locking and a single fieldsReader across all instances. 
Otherwise there are too many instances of fieldsReader and file descriptors 
will be used up.

Maybe instead we should just fix access to FieldsReader to be thread safe, 
either by making FieldsReader itself thread safe, or by doing something similar 
to what's done for TermVectorsReader (where each thread makes a "shallow" clone 
of the original TermVectorsReader, held in a ThreadLocal instance).  If we do 
that, then in SegmentReader.doReopen()  we never have to clone FieldsReader.

> IndexReader.reopen(boolean force)
> ---------------------------------
>
>                 Key: LUCENE-1314
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1314
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Index
>    Affects Versions: 2.3.1
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Minor
>         Attachments: lucene-1314.patch, lucene-1314.patch, lucene-1314.patch
>
>
> Based on discussion 
> http://www.nabble.com/IndexReader.reopen-issue-td18070256.html.  The problem 
> is reopen returns the same reader if there are no changes, so if docs are 
> deleted from the new reader, they are also reflected in the previous reader 
> which is not always desired behavior.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to