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

Jason Rutherglen commented on LUCENE-1314:
------------------------------------------

Following up on the API comment, there can be a version of the norms or 
deletedDocs wrapper class for pre JDK1.5 that uses a synchronized accessor as 
demonstrated 
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/CopyOnWriteArrayList.java
 (works on JDK1.2 and above) and a version for JDK1.5 that uses volatile.  This 
is only for the writeable norms or deletedDocs anyways, but will yield results 
for users who continue to use the default API with a writeable IndexReader.  
The null check can be synchronized and there can be a global setting that tells 
the IndexReader to instantiate a new deletedDocs or norms on init.  

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