Skip to content

SOLR-17864: Migrate System Properties (part ocho)#3625

Merged
epugh merged 11 commits intoapache:mainfrom
epugh:SOLR-17864-part-ocho
Sep 10, 2025
Merged

SOLR-17864: Migrate System Properties (part ocho)#3625
epugh merged 11 commits intoapache:mainfrom
epugh:SOLR-17864-part-ocho

Conversation

@epugh
Copy link
Copy Markdown
Contributor

@epugh epugh commented Sep 6, 2025

https://issues.apache.org/jira/browse/SOLR-17864

solr.prs.default
enable.update.log
zk.server.conf.dir
zk.server.data.dir
zk.run
solr.zk.embedded.host
zk.run.only

…icit boolean.

There is a chance that zkRun=blahblah is a thing, but I don't believe it.  Maybe around port setting SolrZkServer. injectServers, but it may also just be dead code path.
Take advantage of standarized naming to simplify bin/solr scripts too.
@epugh epugh requested review from dsmiley and gerlowskija September 7, 2025 13:39
@epugh
Copy link
Copy Markdown
Contributor Author

epugh commented Sep 7, 2025

@gerlowskija remember when we hacked around with zkRun together in Pittsburgh? I did some refactoring when it went from a string to a boolean, and I'd love another set of eyes...

REM set SOLR_JETTY_HOST=127.0.0.1
REM Sets the network interface the Embedded ZK binds to.
REM set SOLR_ZK_EMBEDDED_HOST=127.0.0.1
REM set SOLR_ZOOKEEPER_SERVER_EMBEDDED_HOST=127.0.0.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why put the word "embedded" in there? "server" implies embedded; it refers to the ZK server that Solr is running itself, embedded.
I could see swapping SERVER for EMBEDDED though... it would be clearer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do want to keep this environmental name the same as the system property, so SOLR_ZOOKEEPER_EMBEDDED_HOST so we get the magic translation and don't need to pass it in expliiclty to Solr...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that; they need to be consistent for EnvUtils to work.
I'm discussing what the name should be (which will look a certain way when expressed as an env var vs system property).

@@ -255,10 +255,11 @@ public String toString() {
private final Map<String, String> replicasInLeaderInitiatedRecovery = new HashMap<>();

// This is an expert and unsupported development mode that does not create
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should drop this entirely. I've never heard of it and doesn't really sound useful TBH. Why run Solr that only runs ZK (that is confusing BTW!) when one could run ZK via Docker? Docker makes running anything easy in a developer workstation scenario, which is what this feature here is for.

CC @markrmiller

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a stab at removing, but if we want to restore it'll be the matter of rolling back a single commit!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #1225833196dea24f413abbc3cc3fbef3d5b769fb

solr.zookeeper.server.confdir=zk.server.conf.dir
solr.zookeeper.server.datadir=zk.server.data.dir
solr.zookeeper.server.enabled=zk.run
solr.zookeeper.server.embedded.host=solr.zk.embedded.host
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah; only this one did you put "embedded". again; don't need both "server" and "embedded"; pick one consistently for the set of running and embedded ZK server.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess i can see an argument for ".server" being for zookeeper server related topics, and then ".embedded" for settings specfic to an embedded ZK...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the same thing. There is no distinction. Solr only runs the server embedded; Solr doesn't run ZK separately. A user probably will but not Solr. These "server" props listed (like confdir) only applies to embedding ZK. In theory we might decide to fork a process to run another JVM for ZK... that would then not be "embedded". I could go either way on standardizing on "server" or "embedded" but I definitely propose we pick one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I missed a rename in the mapping file...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, I just checked and the mapping file has the correct names.

@epugh epugh changed the title SOLR-17864: Migrate System Properties SOLR-17864: Migrate System Properties (part ocho) Sep 7, 2025
@epugh epugh merged commit a4334c6 into apache:main Sep 10, 2025
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants