This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9_7
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_7 by this push:
new 9da01f58e26 SOLR-17457: Backport fix for max-wait-secs (#2719)
9da01f58e26 is described below
commit 9da01f58e26bb08bb01a0e77b74f5ed195be703e
Author: Christos Malliaridis <[email protected]>
AuthorDate: Tue Sep 24 14:49:07 2024 +0200
SOLR-17457: Backport fix for max-wait-secs (#2719)
* Add support for --max-wait-secs and deprecate --maxWaitSecs in StatusTool
---
.../src/java/org/apache/solr/cli/StatusTool.java | 25 ++++++++++++++++------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/cli/StatusTool.java
b/solr/core/src/java/org/apache/solr/cli/StatusTool.java
index d805b292d74..7e8d4ac882c 100644
--- a/solr/core/src/java/org/apache/solr/cli/StatusTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/StatusTool.java
@@ -25,6 +25,7 @@ import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.DeprecatedAttributes;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
@@ -52,7 +53,7 @@ public class StatusTool extends ToolBase {
return "status";
}
- public static final Option OPTION_MAXWAITSECS =
+ private static final Option OPTION_MAXWAITSECS =
Option.builder()
.longOpt("max-wait-secs")
.argName("SECS")
@@ -61,6 +62,20 @@ public class StatusTool extends ToolBase {
.desc("Wait up to the specified number of seconds to see Solr
running.")
.build();
+ private static final Option OPTION_MAXWAITSECS_DEPRECATED =
+ Option.builder("maxWaitSecs")
+ .argName("SECS")
+ .hasArg()
+ .required(false)
+ .desc("Wait up to the specified number of seconds to see Solr
running.")
+ .deprecated(
+ DeprecatedAttributes.builder()
+ .setForRemoval(true)
+ .setSince("9.7")
+ .setDescription("Use --max-wait-secs instead")
+ .get())
+ .build();
+
@Override
public List<Option> getOptions() {
return List.of(
@@ -77,12 +92,8 @@ public class StatusTool extends ToolBase {
+ SolrCLI.getDefaultSolrUrl()
+ '.')
.build(),
- Option.builder("maxWaitSecs")
- .argName("SECS")
- .hasArg()
- .required(false)
- .desc("Wait up to the specified number of seconds to see Solr
running.")
- .build());
+ OPTION_MAXWAITSECS,
+ OPTION_MAXWAITSECS_DEPRECATED);
}
@Override