AndreyBozhko opened a new pull request, #2471:
URL: https://github.com/apache/solr/pull/2471

   https://issues.apache.org/jira/browse/SOLR-XXXXX
   
   
   # Description
   
   Right now, this is just a reproducer for the issue, and a quick attempt to 
fix it.
   
   ### Steps to reproduce
   1. Upload multiple versions of the same package to Solr (the versions don't 
have to be compatible with each other)
   1. Upload a configset which requests a specific package version via 
PKG_VERSIONS in params.json
   1. Create a collection using the uploaded configset
   
   ### Expected behavior
   - If the configsets references custom classes from the package, then Solr 
uses the package version constraint from params.json to initialize all the 
plugins mentioned in `solrconfig.xml` and `schema.xml`
   
   ### Actual behavior
   - Solr uses the package version specified in params.json only for loading 
the `solrconfig.xml` plugins
   - For `schema.xml` plugins (field types, token filters, similarities, etc.) 
Solr always goes for the **latest** available package version, regardless of 
what was specified in params.json
   
   
   ## Why though?
   So it looks like when the schema.xml is loaded, and a SolrResourceLoader 
initializes all schema plugins, the loader isn't able to access the params.json.
   
   The loader keeps a reference to the current SolrConfig which provides access 
to the params.json, but at the time the schema is loaded that reference is 
still null.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [ ] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [ ] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [ ] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [ ] I have developed this patch against the `main` branch.
   - [ ] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to