[
https://issues.apache.org/jira/browse/SOLR-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711941#action_12711941
]
Noble Paul commented on SOLR-920:
---------------------------------
bq.What happens when a core has a copy of schema.xml in its conf/ dir and that
schema.xml is potentially different from the shared one?
for a given path on disk one instance of IndexSchema is maintained in memory.
The cache looks as follows .
{code:java}
// in CoreContainer.java.
//The key is the absolute path to the schema.xml. The value is the IndexSchema
instance.
private Map<String,IndexSchema> schemaCache;
{code}
It is also possible to maintain a timestamp of the file also in the key (say
/data/solr/confschema.xml:yyyyMMddhhmmss)so that if the file is modified a new
instance of IndexScema can be created
> Cache and reuse IndexSchema
> ---------------------------
>
> Key: SOLR-920
> URL: https://issues.apache.org/jira/browse/SOLR-920
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Assignee: Noble Paul
>
> if there are 1000's of cores then the cost of loading unloading schema.xml
> can be prohibitive
> similar to SOLR-919 we can also cache the DOM object of schema.xml if the
> location on disk is same. All the dynamic properties can be replaced lazily
> when they are read.
> We can go one step ahead in this case. Th IndexSchema object is immutable .
> So if there are no core properties then the same IndexSchema object can be
> used across all the cores
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.