gerlowskija opened a new pull request, #2283: URL: https://github.com/apache/solr/pull/2283
https://issues.apache.org/jira/browse/SOLR-17066 # Description Bootstrapping Solr clients with core URLs has several downsides: it prevents the created client from making core-agnostic requests, it prevents the client from making both v1 and v2 requests, etc. For all these reasons, SOLR-17066 has been moving our client implementations away from using these "core URLs" and towards using a "default collection" instead. **Solr's "Load balancing" client is an interesting case though.** A common (maybe even the primary?) use-case of the "LB" client is to round-robin requests across a set of replicas. Each replica in a set has a unique core name, and distinguishing between them is important to ensure uniform load distribution. So users can't rely on the "default collection" feature to meet their needs. We need to free LBClient users of all the "core URL" downsides, while still retaining a way for them to specify a distinct set of replicas/cores. # Solution This PR solves this problem by creating a new LBClient-specific abstraction called an "endpoint". Endpoints are thin wrappers around a Solr base URL and optional core name, and users now provide these "Endpoint" objects when creating their LBClient, instead of passing raw String URLs. Using a strongly typed object instead of raw String URLs allows core-based clients to still make core-agnostic requests as needed, while still supporting the "target a set of distinct replicas" use case. # Tests Changes to `TestLBHttpSolrClient` and `TestLBHttp2SolrClient`. New unit tests for the `Endpoint` class. Existing tests continue to pass. # 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) - [x] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [x] I have added tests for my changes. - [x] I have added Javadoc documentation -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org