noblepaul edited a comment on issue #1124: SOLR-14151 :Schema components to be 
loadable from packages
URL: https://github.com/apache/lucene-solr/pull/1124#issuecomment-569603722
 
 
   I would like to take a stab at the overall design 
   
   ## Various classes
   - `interface ResourceLoader` : The lucene interface that loads classes and 
resources
   - `interface SolrClassLoader extends ResourceLaoder` : Has some extra 
overloaded methods to load plugins with a few extra paramaters
   - `class SolrResourceLoader implements SolrClassLoader` : implements loading 
classes from a set of files on disk and it also has some extra methods 
pertaining to Solr (data dir, conf dir etc, etc). These things do not work with 
packages b/c packages do not support concepts like data dir, schema config etc.
   - `class PackageAwareSolrClassLoader implements SolrClassLoader`:  Has extra 
functionality of listening to package changes and give callback to reload 
something if anything changes. This outsources the classloading from file 
system to `SolrResourceLoader` itself. 
   
    ## Hotloading
   
   There are 2 types of hot loading implemented as of today
   1.  In place update of individual plugins: Most components configured in 
`solrconfig.xml` today support hotloading. Each object listens to its package 
changes and reload
   2. schema : This treats the entire `IndexSchema` object as a single entity. 
Each object listens to package changes , if any package is modified, the entire 
`IndexSchema` is reloaded
   3. TODO : We can support a new class of plugins which actually can reload 
the `SolrCore` when packages are updated. #1109 can use the 
`PackageAwareSolrClassLoader` to listen to and reload core
   
   Your worst fears can be addressed with the following 
   - Is there any component in IndexSchema that is referred and stored outside 
of IndexSchema object?
   - The following method in `SolrCore` must be broken , if this is true.
   ```
   public void setLatestSchema(IndexSchema replacementSchema)
   ```
    AFAIK, there are no known issues
   
   In the worst case we can provide an extra hook for you to reload core always 
when schema components are changed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to