SOLR-18089: Configure zookeeper.maxCnxns for embeddedZkServer#4173
Open
openworld-maker wants to merge 2 commits intoapache:mainfrom
Open
SOLR-18089: Configure zookeeper.maxCnxns for embeddedZkServer#4173openworld-maker wants to merge 2 commits intoapache:mainfrom
openworld-maker wants to merge 2 commits intoapache:mainfrom
Conversation
dsmiley
reviewed
Mar 2, 2026
Contributor
There was a problem hiding this comment.
Instead, you can merely observe (once, manually) that the log message about this matter has disappeared. Tests need to be maintained and add a cost in perpetuity that I don't think is warranted for this matter.
Comment on lines
+216
to
+218
| if (System.getProperty(ZK_MAX_CNXNS_PROPERTY) == null) { | ||
| System.setProperty(ZK_MAX_CNXNS_PROPERTY, ZK_MAX_CNXNS_DEFAULT); | ||
| } |
Contributor
There was a problem hiding this comment.
lets use `System.getProperties().putIfAbsent(...) instead of multiple operaitons
|
|
||
| public static final String ZK_WHITELIST_PROPERTY = "zookeeper.4lw.commands.whitelist"; | ||
| public static final String ZK_MAX_CNXNS_PROPERTY = "zookeeper.maxCnxns"; | ||
| public static final String ZK_MAX_CNXNS_DEFAULT = "0"; |
Contributor
There was a problem hiding this comment.
Comment what this value semantically means. Infinite?
Contributor
Author
|
@dsmiley requested updates are done:
Thanks for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes SOLR-18089 by explicitly configuring ZooKeeper's
zookeeper.maxCnxnssystem property to0for 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.maxCnxnswith default0. Setting it explicitly suppresses the warning while preserving behavior.Changes
SolrZkServer:ZK_MAX_CNXNS_PROPERTY = "zookeeper.maxCnxns"ZK_MAX_CNXNS_DEFAULT = "0"ensureZkMaxCnxnsConfigured()and invoked it in:SolrZkServer.start()before ZooKeeper startupZkTestServer.run(...)before server initialization in test frameworkTests
ZkTestServerTest#testEmbeddedZkServerSetsMaxCnxnsDefaultWhenUnset:zookeeper.maxCnxnsZkTestServer"0"finallyVerification
:solr:test-framework:test --tests org.apache.solr.cloud.ZkTestServerTestpassed.tidy checkwas attempted but hit unrelated flaky failures insolrjtests (CloudSolrClientCacheTest).tidy:solr:core:check -x test:solr:test-framework:check -x test