You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/06/25 00:46:07 UTC
[jira] Commented: (LUCENE-1707) Don't use ensureOpen() excessively
in IndexReader and IndexWriter
[ https://issues.apache.org/jira/browse/LUCENE-1707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723782#action_12723782 ]
Michael McCandless commented on LUCENE-1707:
--------------------------------------------
I'd actually rather not remove the ensureOpen calls (I think it's
better when the user sees an AlreadyClosedException than an NPE from
somewhere deeper in IndexReader), but instead change it to a best
effort impl (ie don't use volatile).
I think for nearly all the methods where we have ensureOpen today, the
cost (once we stop checking volatile) is tiny (this coming from
someone who is normally a freak about performance!).
> Don't use ensureOpen() excessively in IndexReader and IndexWriter
> -----------------------------------------------------------------
>
> Key: LUCENE-1707
> URL: https://issues.apache.org/jira/browse/LUCENE-1707
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Index
> Reporter: Shai Erera
> Fix For: 2.9
>
> Attachments: LUCENE-1707.patch
>
>
> A spin off from here: http://www.nabble.com/Excessive-use-of-ensureOpen()-td24127806.html.
> We should stop calling this method when it's not necessary for any internal Lucene code. Currently, this code seems to hurt properly written apps, unnecessarily.
> Will post a patch soon
--
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org