nick-boss-tech opened a new pull request, #5342: URL: https://github.com/apache/solr/pull/5342
🤖 *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](https://github.com/nick-boss-tech/solr/blob/45956fbe7f530d77702c586d62de2a5609ab20af/solr/core/src/java/org/apache/solr/cli/ToolBase.java#L136-L157) 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](https://github.com/nick-boss-tech/solr/blob/7735f577a7bc716ef790e7268130e7760a458ed9/records/receipt/solr-18138-cli-linux-gate-r1-receipt.json) and [integration rerun receipt](https://github.com/nick-boss-tech/solr/blob/7735f577a7bc716ef790e7268130e7760a458ed9/records/receipt/solr-18138-cli-linux-gate-r2-receipt.json). </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](https://github.com/nick-boss-tech/solr/blob/45956fbe7f530d77702c586d62de2a5609ab20af/changelog/unreleased/SOLR-18138-cli-zookeeper-timeout.yml) *AI-generated description. Nick Shanin directed the work and takes responsibility for this contribution.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
