SOLR-18606: Refresh missing collection state without repeated alias lookups #5314
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 368 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5314"
general
weight: 0.35
nick-boss-tech
🤖 AI text below 🤖 (posted on behalf of Nick Shanin)
Draft status is due to Nick Shanin's open-PR cap; the change is ready for review.
https://issues.apache.org/jira/browse/SOLR-18606
What happens today
A stale client view can reject a newly created collection.
The ZooKeeper cluster-state provider can return no state for a collection that its local view has not learned about yet.
CloudSolrClientcan then report "Collection not found" before sending the request.What this change does
Refresh missing collection state while avoiding repeated lookups for known aliases.
The ZooKeeper provider checks its local collection and alias views first. For a missing name, it refreshes collection state from ZooKeeper. It reports ZooKeeper failures as server errors and restores the interrupt flag on interruption. When alias resolution leaves a missing name unchanged, the client avoids a second lookup within the request.
Proof
Tests cover collection discovery and the known-alias guard.
<details>
<summary>Linux verification at 2dbfc9f32aa34cef586f32c7b473a5cd689e8705</summary>
On November 13, 2026,
ZkClientClusterStateProviderTestand the repeated alias-query test inCloudHttp2SolrClientTesteach passed once with seed18606CAFE, without skips. Removing the known-alias guard made the provider test fail on the alias state path. The verification record has the results.The non-test root check passed with Docker and reference-guide checks excluded.
</details>
A choice to check
I recommend refreshing client state on a miss.
The other approach discussed on the issue is to forward an unknown collection request to a live node. Refreshing the client view preserves normal client routing when ZooKeeper has the collection, at the cost of a lookup on a miss. Does this choice look right?
Limits
Unknown names can trigger repeated lookups, and the alias view is not forcibly refreshed.
The refresh does not sync ZooKeeper first. A collection created during a request can require a subsequent request to be discovered. The alias read test exercises the provider directly; it does not count reads across full client requests.
Changelog: SOLR-18606.yml
AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.