-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-16959: Make CoresLocator class configurable #1891
Conversation
2d32cd4
to
fe87566
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this Vincent. Looks good to me.
Full disclaimer: I work with Vincent in the same company and that change, in addition to aligning CoresLocator
with configuration flexibility available for other classes will also eventually simplify the integration of new types of cores that have no local presence (index Blob/S3 storage Salesforce plans to eventually contribute, see email).
solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
Outdated
Show resolved
Hide resolved
63c6625
to
83455b4
Compare
Can you please add a CHANGES.txt note in the 9.4 section, probably in the "Improvements" section? A brief sentence would do like "Make the internal CoresLocator implementation configurable in solr.xml" |
@dsmiley That's done. |
# Conflicts: # solr/CHANGES.txt
Co-authored-by: Vincent Primault <[email protected]> (cherry picked from commit 708ab9b)
https://issues.apache.org/jira/browse/SOLR-16959
Description
I would like to be able to hook into the process of discovering and persisting core descriptors. This allows to work with core descriptors not stored locally, or replicated elsewhere.
Solution
For this purpose, I propose to make the CoresLocator instance configurable, pretty much like other services (e.g., ConfigSetService, some handlers) are already configurable. Attached PR creates a new "coresLocator" parameter in solr.xml in order to achieve this. Because it is created outside of the CoreContainer (it is needed to load a CoreContainer), constructor of a custom CoresLocator receives a NodeConfig object (and not a CoreContainer) that it can use to lookup other parameters, if required.
Tests
I added new unit tests to validate the correct instantiation of a CoresLocator.
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.