SOLR-17533: Rearrange and cleanup solr.cmd#2822
Merged
malliaridis merged 5 commits intoapache:mainfrom Nov 9, 2024
Merged
Conversation
This part of the script is not reachable anymore.
epugh
reviewed
Oct 30, 2024
|
|
||
|
|
||
| REM Really basic command-line arg parsing | ||
| REM Parse arguments for special commands (start, stop, restart) |
Contributor
Author
There was a problem hiding this comment.
This part is skipped in case of the auth command. The auth command has its own parsing plus the java class parsing. If I am not mistaken, this was the same behavior before and if I am not mistaken bin/solr does the same. Correct me if I am wrong though.
Contributor
There was a problem hiding this comment.
Yeah, it does.. I think the way in bin/solr it is that first you do everything. Then you do auth. Then you do the remaining ones of start, stop, restart.
epugh
reviewed
Oct 30, 2024
epugh
approved these changes
Oct 30, 2024
Contributor
epugh
left a comment
There was a problem hiding this comment.
LGTM. One nit on the help args... So much cleaner. and I love that it ends up removing 298 lines of code!
# Conflicts: # solr/bin/solr.cmd
tboeghk
pushed a commit
to otto-de/solr
that referenced
this pull request
Feb 18, 2026
* Remove ZK logic from solr.cmd This part of the script is not reachable anymore. * Fix unreachable auth tool in solr.cmd * Fix invalid references * Rearrange and cleanup solr.cmd
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.
https://issues.apache.org/jira/browse/SOLR-17533
Description
By rearranging the code we can allow the java classes to handle more of the argument parsing and remove some more lines from
bin/solr.cmd.Solution
This PR rearranges the code in a way that it is a more "top-to-bottom" flow without many up-and-down jumps via
goto. Additionally, it gets rid of unnecessary statements and parsing and forwards all interactions toSolrCLIif it is not one of the commandsstart,stoporrestart. This approach is followed inbin/solras well.Tests
We are still lacking on tests for the
bin/solr.cmdscript. See SOLR-17508.Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.