← Back to Pull requests

SOLR-7596: Make the embedded ZooKeeper port configurable #5347

Open
unknown opened this pull request with 212 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 14, 2026 17:59 UTC
Author

🤖 AI-assisted, reviewed by Jan

The embedded ZooKeeper client port is no longer always solrPort + 1000: the new solr.zookeeper.embedded.port setting (env var SOLR_ZOOKEEPER_EMBEDDED_PORT) assigns it explicitly, which lets a test harness pin every port a node uses instead of deriving it.

  • Precedence: clientPort in zoo.cfg, else solr.zookeeper.embedded.port, else solrPort + 1000

  • The setting is validated to be 1..65535; the Solr port itself is now capped at 64000 in RunExampleTool and both scripts, leaving room for the +1000 ZooKeeper offset and the example node offsets

  • RunExampleTool passes the setting to the node that starts embedded ZooKeeper and uses the same value for the -z string it gives the other nodes

  • Verification. Linux: SolrZkServerTest (precedence, default, invalid values), TestSolrCLIRunExample and SolrCLIRunExamplePicocliTest, check with Error Prone. Windows (cmd.exe, VM, distribution built from 6e86bf4538f): with SOLR_ZOOKEEPER_EMBEDDED_PORT=12345, start -c -p 8983 reports "ZooKeeper":"127.0.0.1:12345", netstat shows 12345 listening and nothing on 9983, zk ls / -z localhost:12345 works while -z localhost:9983 times out; start -p 64001 is refused with the 64000 message and start -p 64000 -c starts with ZooKeeper on 65000; start -e cloud --no-prompt with the setting at 12346 brings up both example nodes with ZooKeeper on 12346 and both in live_nodes, which on Windows works only because the setting is forwarded as -D (the example strips SOLR_* from the child environment); the new -z help text shows on both the picocli and the commons-cli path.

  • https://issues.apache.org/jira/browse/SOLR-7596
  • Diff: 212 lines (+159 / -53) across 2 files Reviewer: janhoy Review duration: 24937m
    All Vouch review confidence checks passed
    Residual risk 0.33 = Change Risk (0.60) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.60 · 212 lines diff across 2 files
    0.60
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.321
    Sensitive Paths sensitive_paths
    0.060
    Real PR Conversation Timeline
    1 comments
    "Review active on #5347"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.2% reviewed sensitive_module
    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: 59.7% (MEDIUM) · Higher = larger blast radius
    59.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: 44.2% · Lower = rushed or shallow review
    44.2%
    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: 33.3% · Safe to merge
    33.3%
    Repository