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

Robert Muir commented on SOLR-2654:
-----------------------------------

{quote}
I take the ensureOpen check out of IndexWriter on getDirectory. Anyone object? 
I don't know why we care if the IndexWriter is still open if we want to grab 
which Directory it used. You can hack around it, but I don't see why we don't 
just remove the check. Thoughts?
{quote}

+1... its just a getter for the Dir, no reason to ensure its open. you might 
just want to do instanceof or something.

In any case, the Directory *itself* not indexwriter should be calling 
ensureOpen before doing things that require an open dir.

Maybe we could spin off a separate issue to make a test for this, i know its 
inconsistent everywhere.

> <lockType/> not used consistently in all places Directory objects are 
> instantiated
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-2654
>                 URL: https://issues.apache.org/jira/browse/SOLR-2654
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>            Assignee: Mark Miller
>             Fix For: 3.4, 4.0
>
>         Attachments: SOLR-2654.patch, SOLR-2654.patch, SOLR-2654.patch, 
> SOLR-2654.patch, SOLR-2654.patch, SOLR-2654.patch, SOLR-2654.patch, 
> SOLR-2654.patch, SOLR-2698.patch
>
>
> nipunb noted on the mailing list then when configuring solr to use an 
> alternate <lockType/> (ie: simple) the stats for the SolrIndexSearcher list 
> NativeFSLockFactory being used by the Directory.
> The problem seems to be that SolrIndexConfig is not consulted when 
> constructing Directory objects used for IndexReader (it's only used by 
> SolrIndexWriter)
> I don't _think_ this is a problem in most cases since the IndexReaders should 
> all be readOnly in the core solr code) but plugins could attempt to use them 
> in other ways.  In general it seems like a really bad bug waiting to happen.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to