-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-17533: Rearrange and cleanup solr.cmd #2822
SOLR-17533: Rearrange and cleanup solr.cmd #2822
Conversation
This part of the script is not reachable anymore.
@@ -383,18 +355,19 @@ goto done | |||
@echo. | |||
goto done | |||
|
|||
|
|||
REM Really basic command-line arg parsing | |||
REM Parse arguments for special commands (start, stop, restart) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe say "auth" too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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 toSolrCLI
if it is not one of the commandsstart
,stop
orrestart
. This approach is followed inbin/solr
as well.Tests
We are still lacking on tests for the
bin/solr.cmd
script. See SOLR-17508.Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.