You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2009/01/23 08:04:59 UTC

[jira] Commented: (SOLR-921) SolrResourceLoader must cache name vs class

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

Shalin Shekhar Mangar commented on SOLR-921:
--------------------------------------------

Hoss, the use-case is for a server with very large number of cores with cores being loaded/unloaded all the time.

For your concern #1 -- The code does not cache if the package list passed to the method is different from the default list of packages (which are always loaded by the webapp classloader. So these can be shared by all cores.

On #2 -- When you put custom classes in $solr_home/lib, they have different packages from Solr's own packages. So one would most likely put the fully qualified class name. In that case the caching won't happen.

The only problem right now is that if you want to override a class supplied by Solr by adding a jar to the $solr_home/lib, it won't take precedence. This can be fixed easily before we commit.

> SolrResourceLoader must cache name vs class
> -------------------------------------------
>
>                 Key: SOLR-921
>                 URL: https://issues.apache.org/jira/browse/SOLR-921
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Noble Paul
>             Fix For: 1.4
>
>         Attachments: SOLR-921.patch
>
>
> every class that is loaded through SolrResourceLoader does a Class.forName() and when if it is not found a ClassNotFoundExcepton is thrown
> Then , it looks up with the various packages and finds the right class if the name starts with solr. Considering the fact that we usually use this solr.<classname> format we pay too much of a price for this. After every lookup the result can be cached in a Map<String,Class> and can be shared across all the cores and this Map can be stored at the CoreContainer level

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.