openworld-maker opened a new pull request, #4173:
URL: https://github.com/apache/solr/pull/4173

   ## What
   Fixes [SOLR-18089](https://issues.apache.org/jira/browse/SOLR-18089) by 
explicitly configuring ZooKeeper's `zookeeper.maxCnxns` system property to `0` 
for embedded ZooKeeper startup when it is not already set.
   
   ## Why
   Embedded ZK startup emits:
   "maxCnxns is not configured, using default value 0."
   
   ZooKeeper uses `zookeeper.maxCnxns` with default `0`. Setting it explicitly 
suppresses the warning while preserving behavior.
   
   ## Changes
   - Added constants in `SolrZkServer`:
     - `ZK_MAX_CNXNS_PROPERTY = "zookeeper.maxCnxns"`
     - `ZK_MAX_CNXNS_DEFAULT = "0"`
   - Added `ensureZkMaxCnxnsConfigured()` and invoked it in:
     - `SolrZkServer.start()` before ZooKeeper startup
     - `ZkTestServer.run(...)` before server initialization in test framework
   - Guarded behavior: only sets property when currently unset (does not 
override user-provided value).
   
   ## Tests
   - Added `ZkTestServerTest#testEmbeddedZkServerSetsMaxCnxnsDefaultWhenUnset`:
     - clears `zookeeper.maxCnxns`
     - starts embedded `ZkTestServer`
     - asserts property equals `"0"`
     - restores prior property value in `finally`
   
   ## Verification
   - `:solr:test-framework:test --tests org.apache.solr.cloud.ZkTestServerTest` 
passed.
   - Full `tidy check` was attempted but hit unrelated flaky failures in 
`solrj` tests (`CloudSolrClientCacheTest`).
   - Ran equivalent focused validation for touched modules:
     - `tidy`
     - `:solr:core:check -x test`
     - `:solr:test-framework:check -x test`
   


-- 
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]

Reply via email to