You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ep...@apache.org on 2024/09/11 12:54:41 UTC
(solr) branch branch_9x updated: SOLR-16254: Clarify when a create needs to be run on the same server as Solr. (#2698)
This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 58283d24298 SOLR-16254: Clarify when a create needs to be run on the same server as Solr. (#2698)
58283d24298 is described below
commit 58283d24298910e78e7f2da79206570502cb5e83
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Wed Sep 11 08:42:16 2024 -0400
SOLR-16254: Clarify when a create needs to be run on the same server as Solr. (#2698)
* Introduce new header for help text to clarify when you must run on the same server as solr.
* small formatting tweak to improve whitespace in cli output
* use similar text for similar meaning
(cherry picked from commit 14c9575611e2c77c713760a9d01c5f8cb88cad23)
---
solr/CHANGES.txt | 2 ++
solr/core/src/java/org/apache/solr/cli/AuthTool.java | 2 +-
solr/core/src/java/org/apache/solr/cli/CreateTool.java | 8 ++++++++
solr/core/src/java/org/apache/solr/cli/DeleteTool.java | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 909d938f777..4db7f2a012c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -49,6 +49,8 @@ Bug Fixes
* SOLR-17416: Fixed ExportHandler bug that silently suppressed errors and returned partial results in some situations (hossman)
+* SOLR-16254: Clarify when a bin/solr create needs to be run on the same server as Solr. (Eric Pugh)
+
Dependency Upgrades
---------------------
(No changes)
diff --git a/solr/core/src/java/org/apache/solr/cli/AuthTool.java b/solr/core/src/java/org/apache/solr/cli/AuthTool.java
index 29819f5d8a5..5da9f4d5a69 100644
--- a/solr/core/src/java/org/apache/solr/cli/AuthTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/AuthTool.java
@@ -75,7 +75,7 @@ public class AuthTool extends ToolBase {
@Override
public String getHeader() {
- return "\nUpdates or enables/disables authentication. Must be run on the machine hosting Solr.\n"
+ return "Updates or enables/disables authentication. Must be run on the Solr server itself.\n"
+ "\n"
+ "List of options:";
}
diff --git a/solr/core/src/java/org/apache/solr/cli/CreateTool.java b/solr/core/src/java/org/apache/solr/cli/CreateTool.java
index 6f869e990e5..8f6921aff2d 100644
--- a/solr/core/src/java/org/apache/solr/cli/CreateTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/CreateTool.java
@@ -66,6 +66,14 @@ public class CreateTool extends ToolBase {
return "create";
}
+ @Override
+ public String getHeader() {
+ return "Creates a core or collection depending on whether Solr is running in standalone (core) or SolrCloud mode (collection).\n"
+ + "If you are using standalone mode you must run this command on the Solr server itself.\n"
+ + "\n"
+ + "List of options:";
+ }
+
@Override
public List<Option> getOptions() {
return List.of(
diff --git a/solr/core/src/java/org/apache/solr/cli/DeleteTool.java b/solr/core/src/java/org/apache/solr/cli/DeleteTool.java
index d5bf4234858..125237698f3 100644
--- a/solr/core/src/java/org/apache/solr/cli/DeleteTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/DeleteTool.java
@@ -64,7 +64,7 @@ public class DeleteTool extends ToolBase {
@Override
public String getHeader() {
- return "\nDeletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud"
+ return "Deletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud"
+ " mode (collection). If you're deleting a collection in SolrCloud mode, the default behavior is to also"
+ " delete the configuration directory from Zookeeper so long as it is not being used by another collection.\n"
+ " You can override this behavior by passing -deleteConfig false when running this command.\n"