skysanjay opened a new pull request, #3936: URL: https://github.com/apache/solr/pull/3936
https://issues.apache.org/jira/browse/SOLR-17461 * SOLR-17461: (cleanup) Move ClusterState string "Interner" json parser to Utils # Description ClusterState.setStrInternerParser and its functionality is potentially of general utility and it's also a bit distracting in ClusterState. I also don't like CoreContainer being involved in initializing it (CoreContainer is doing too much!). It's doing it because ClusterState is in SolrJ without Caffeine being on the classpath. Instead, imagine a class in solr-core that implements this Function. Utils could then self-initialize via reflection detecting if that class is available, otherwise gracefully resorting to the non-intern mechanism. No touching CoreContainer which is way too busy doing many things. # Solution moved the common method to Utils, the WeakStringInterner initialization is based on availability of caffeine classed and it will conditionally change the STR_INTERNER_OBJ_BUILDER of the ClusterState object # Tests it is not applicable but will try to add junit for same. # Checklist Please review the following and check all that apply: - [X] 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. - [X] I have created a Jira issue and added the issue ID to my pull request title. - [X] 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, not available for branches on forks living under an organisation) - [X] I have developed this patch against the `main` branch. - [X] 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) - [X] I have added a [changelog entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my change -- 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]
