SOLR-18138: Explain ZooKeeper connection timeouts in the CLI #5342
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 · 363 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.353
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5342"
general
weight: 0.35
nick-boss-tech
🤖 AI text below 🤖 (posted on behalf of Nick Shanin)
Draft status reflects the current PR creation restriction; the change is ready for review.
https://issues.apache.org/jira/browse/SOLR-18138
What happens today
A direct ZooKeeper connection timeout leaves the CLI user with an error and stack trace that do not explain what to check. For example, this can happen when the stopped Solr node hosted the embedded ZooKeeper server.
What this change does
The CLI explains the initial connection timeout and suggests checking ZooKeeper and its host. ToolBase recognizes the specific initial timeout in both CLI parser paths. The ZooKeeper tools omit their duplicate error trace for that timeout unless verbose mode is enabled. Other errors keep their existing handling.
Proof
The regression checks the real CLI timeout and the focused unit test checks timeout classification.
<details>
<summary>Linux verification at 45956fbe7f530d77702c586d62de2a5609ab20af</summary>
:solr:core:test --tests org.apache.solr.cli.ToolBaseZkTimeoutTest -Ptests.seed=18138: 1 test passed.:solr:packaging:integrationTests --tests test_zk.bats -Ptests.seed=18138: 12 tests passed, no skips, and teardown completed. The host used a child subreaper to reap orphaned Solr processes; loopback port 1 was verified closed before the test.tidypassed with no tracked changes.check -x test -Prefguide.include=falsepassed; the reference guide was excluded because the gate worktree's.gitfile could not be resolved by Antora.First gate receipt and integration rerun receipt.
</details>
Limits
Server-side ZooKeeper ConnectionLoss messages are unchanged. This covers initial direct ZooKeeper connection timeouts, rather than errors returned by the Solr HTTP endpoint. The BATS regression uses
127.0.0.1:1and requires that port to be closed.Changelog: SOLR-18138-cli-zookeeper-timeout.yml
AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.