[
https://issues.apache.org/jira/browse/SOLR-2654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080669#comment-13080669
]
Mark Miller commented on SOLR-2654:
-----------------------------------
Current patch, directories are all closed when a SolrCore is finally closed
(not reloaded). This is new, and should alleviate the need for the test close
dir hack.
The reason I want to sometimes close them early is that the index dir for a
core can change - either on reload (unlikely) or by the replication handler. So
if you had a Solr instance up for a long time, and used replication, you could
end up, over time, with a lot of open Directories in the directory cache -
currently, this is not much of a problem - replication only works with
FSDirectories anyway. But I'd like to see that limitation fixed too - so that
something like a RAMDirectory could work with replication - and in that case,
this would be slightly more important*, as an unclosed RAMDirectory will take
up much more RAM than an FSDirectory, which does nothing on close anyway (*only
slightly more important because replication only uses a new index dir in a
minority of cases).
> <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
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]