← Back to Pull requests

SOLR-18606: Refresh missing collection state without repeated alias lookups #5314

Closed
unknown closed this pull request without merging on Nov 15, 2026 05:46 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 21:12 UTC
Author

🤖 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. CloudSolrClient can 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, ZkClientClusterStateProviderTest and the repeated alias-query test in CloudHttp2SolrClientTest each passed once with seed 18606CAFE, 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.

Diff: 368 lines (+276 / -92) across 4 files Reviewer: nick-boss-tech Review duration: 7713m
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
0.43
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 42.8% (MEDIUM) · Higher = larger blast radius
42.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.9% · Safe to merge
16.9%
Repository