Skip to content
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-17674: Refresh bin/solr instructions to down play SolrCloud and introduce --user-managed example. #3190

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ if [[ "$SCRIPT_CMD" == "auth" ]]; then
exit $?
fi

# at this point all tools that have a custom run process, like "status" and "auth" have been run and exited.
# At this point all tools that have a custom run process, like "status" and "auth" have been run and exited.
# Unless a command is one of the ones in the if clause below, we will just run it with the default run_tool function and then exit.
if [ "$SCRIPT_CMD" != "start" ] && [ "$SCRIPT_CMD" != "stop" ] && [ "$SCRIPT_CMD" != "restart" ]; then
# hand off the command to the SolrCLI and let it handle the option parsing and validation
Expand Down
10 changes: 7 additions & 3 deletions solr/core/src/java/org/apache/solr/cli/SolrCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,23 +409,27 @@ private static void printHelp() {
print(
" healthcheck, create, delete, auth, assert, config, export, api, package, post, stream,");
print(
" zk ls, zk cp, zk rm , zk mv, zk mkroot, zk upconfig, zk downconfig,");
" zk ls, zk cp, zk rm , zk mvStandalone server example, zk mkroot, zk upconfig, zk downconfig,");
Copy link
Contributor

Choose a reason for hiding this comment

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

[-1] What is "Standalone server example" doing in this list of bin/solr subcommands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

copy paste issue!

print(
" snapshot-create, snapshot-list, snapshot-delete, snapshot-export, snapshot-prepare-export");
print("");
print(" Standalone server example (start Solr running in the background on port 8984):");
print(" Start Solr running in the background on port 8984:");
Copy link
Contributor

Choose a reason for hiding this comment

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

[0] IMO the lead-in to this example should make some reference either to the "mode" or the ZK that will be used. Especially since this behavior changed in Solr 10, a user coming from Solr 9 could read this snippet and be none-the-wiser that they're about to run SolrCloud.

Also, is the "in the background" bit worth retaining?

Perhaps:

Start Solr with its own "embedded" ZooKeeper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i agree, the background isn't important, and in fact what you would assume! Also, this I think is the crux of the cahnge. Yes user from Solr 9, you dn't have to be any the wiser that you are running SolrCloud. This is the downplaying of SolrCloud (and it's attendent baggage ZK)

print("");
printGreen(" ./solr start -p 8984");
print("");
print(
" SolrCloud example (start Solr running in SolrCloud mode using localhost:2181 to connect to Zookeeper, with 1g max heap size and remote Java debug options enabled):");
" Start Solr connecting to external Zookeeper at localhost:2181, with 1g max heap size and remote Java debug options enabled):");
print("");
printGreen(
" ./solr start -m 1g -z localhost:2181 --jvm-opts \"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044\"");
print("");
print(
" Omit '-z localhost:2181' from the above command if you have defined ZK_HOST in solr.in.sh.");
print("");
print(" Start Solr in User Managed (aka standalone) mode:");
print("");
printGreen(" ./solr start --user-managed");
print("");
print("Global Options:");
print(" -v, --version Print version information and quit");
print(" --verbose Enable verbose mode");
Expand Down
Loading