← Back to Pull requests

SOLR-18138: Explain ZooKeeper connection timeouts in the CLI #5342

Closed
unknown closed this pull request without merging on Nov 17, 2026 15:10 UTC
View on GitHub
unknown unknown commented on Nov 13, 2026 20:47 UTC
Author

🤖 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.

  • The new BATS assertion failed on the old production code because the improved message was absent. The new regression and existing ZooKeeper tests passed at the submitted head.

  • The CLI check exited nonzero with the improved message; verbose mode also retained the diagnostic stack trace.

  • tidy passed with no tracked changes. check -x test -Prefguide.include=false passed; the reference guide was excluded because the gate worktree's .git file 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:1 and 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.

    Diff: 363 lines (+272 / -91) across 4 files Reviewer: nick-boss-tech Review duration: 5422m
    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
    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.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5342"
    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.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    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