[
https://issues.apache.org/jira/browse/LUCENE-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919568#action_12919568
]
Simon Willnauer commented on LUCENE-2691:
-----------------------------------------
bq. Should be good to go, but may need a few doc improvements.
I think docs are fine though at least what I read on IR but I wonder why we
need to synchronize on the iIR here since this call only forwards to the given
writer?
{code}
public synchronized IndexReader reopen(IndexWriter writer) throws
CorruptIndexException, IOException {
return writer.getReader();
}
{code}
I would guess calling writer.getReader() in there should not block other
actions like concurrent searches on this reader since a NRT getRearder call can
take its time. If at all we should sync on the writer though (which is already
done inside IW) or do I miss something?
> Consolidate Near Real Time and Reopen API semantics
> ---------------------------------------------------
>
> Key: LUCENE-2691
> URL: https://issues.apache.org/jira/browse/LUCENE-2691
> Project: Lucene - Java
> Issue Type: Improvement
> Reporter: Grant Ingersoll
> Assignee: Grant Ingersoll
> Priority: Minor
> Fix For: 3.1, 4.0
>
> Attachments: LUCENE-2691.patch
>
>
> We should consolidate the IndexWriter.getReader and the IndexReader.reopen
> semantics, since most people are already using the IR.reopen() method, we
> should simply add::
> {code}
> IR.reopen(IndexWriter)
> {code}
> Initially, it could just call the IW.getReader(), but it probably should
> switch to just using package private methods for sharing the internals
--
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]