SOLR-18446: Keep collection routing path-scoped in HttpSolrCall #5202
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.55) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 512 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.373
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #5202"
general
weight: 0.35
nick-boss-tech
🤖 AI text below 🤖 (posted on behalf of Nick Shanin)
https://issues.apache.org/jira/browse/SOLR-18446
What happens today
When a request carries a
collectionparameter that disagrees with the collection named in the URL path, HttpSolrCall routes by the parameter, so the request can be served by a collection it was not addressed to.HttpSolrCall at the base resolves the request's collection with the
collectionparameter taking precedence over the path. The ticket states the rule this violates: the URL path alone should govern which collection receives a collection-scoped request.What this change does
The URL path decides the collection, on the v1 and the V2 entry paths alike; the
collectionparameter no longer overrides the path the request was sent to.HttpSolrCall.java takes the collection from the path, and V2HttpCall.java now resolves the collection from its path segment instead of the parameter. HttpSolrCallCloudTest covers the v1 disagreement case, the narrowing case, and the V2 disagreement case. Four existing tests that relied on the parameter winning (BasicDistributedZkTest, TestDistribIDF, RuleBasedAuthorizationCoreCollectionTest, DistributedQueryComponentOptimizationTest) now put their collections in the path, and AliasIntegrationTest keeps a case where a CloudSolrClient carries the collection only as a parameter, which the client moves into the path. The Ref Guide's distributed-requests page now describes the parameter as narrowing the path, and the Solr 11 major-changes page records the removal. Eleven files change, including the changelog entry.
Proof
The new V2 coverage failed before its fix and passes at this head; the checks below ran on this exact tree, verified 2026-10-22.
expected:<[collection1]> but was:<[collection2]>(the parameter winning on the V2 path); the other four HttpSolrCallCloudTest tests passed.Limits
Requests whose parameter matches their path route as before. Three cases change: a parameter that disagrees with the path, a request with no collection in the path, and a multi-collection path with a non-matching parameter.
collectionparameter will now be routed by the path./solr/select?collection=c1, now returns 404 instead of routing by the parameter.Changelog: changelog/unreleased/SOLR-18446-path-controls-collection-routing.yml
AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.