You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "gerlowskija (via GitHub)" <gi...@apache.org> on 2024/02/19 17:25:48 UTC

[PR] SOLR-17066: Switch "LB" clients away from core URLs [solr]

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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-17066: Switch "LB" clients away from core URLs [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #2283:
URL: https://github.com/apache/solr/pull/2283#issuecomment-1952942344

   **Question** Is this change worth the added complexity?  I'm excited to move away from core URLs, but want to make sure the net effect is still positive given some of the complexity this pulls in.  Curious what others think. 
   
   If we do go this route, this change should target `main`/10.0 **only**; I don't think 9.x is an option, since we still support arbitrary "context root"s on that branch.  (Though of course, we'll need to make some sort of branch_9x change to deprecate the LBClient method signatures that this PR modifies)


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-17066: Switch "LB" clients away from core URLs [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija merged PR #2283:
URL: https://github.com/apache/solr/pull/2283


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org