From 9d126d4c69e68519da795ccc184bc5b3d8625833 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Tue, 17 Dec 2024 09:55:19 -0500 Subject: [PATCH 1/3] Reformat comment better (#2910) --- .../org/apache/solr/handler/ReplicationHandler.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java index a72fd4363e8..8b126b5cc06 100644 --- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java @@ -1517,12 +1517,11 @@ private Long readIntervalNs(String interval) { public static final String FETCH_FROM_LEADER = "fetchFromLeader"; - // in case of TLOG replica, if leaderVersion = zero, don't do commit - // otherwise updates from current tlog won't be copied over properly to the new tlog, leading to - // data - // loss - // don't commit on leader version zero for PULL replicas as PULL should only get its index - // state from leader + // In case of TLOG replica, if leaderVersion = zero, don't do commit + // otherwise updates from current tlog won't be copied over properly to the new tlog, + // leading to data loss. + // Don't commit on leader version zero for PULL replicas as PULL should only get its index + // state from leader. public static final String SKIP_COMMIT_ON_LEADER_VERSION_ZERO = "skipCommitOnLeaderVersionZero"; public static final String MESSAGE = "message"; From a4229e76771da0125b38204db01ea0934e09c4f4 Mon Sep 17 00:00:00 2001 From: Christos Malliaridis Date: Tue, 17 Dec 2024 17:03:22 +0200 Subject: [PATCH 2/3] SOLR-17595: Fix Solr examples for Windows (#2909) * Fix argument parsing for -D options with multiple values on Windows * Fix invalid usage of wildcards in RunExampleTool / PostTool --- solr/CHANGES.txt | 3 +++ solr/bin/solr.cmd | 1 - solr/core/src/java/org/apache/solr/cli/RunExampleTool.java | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index a5f6c24d1d1..752c2670887 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -273,6 +273,9 @@ Bug Fixes * SOLR-17574: Fix AllowListUrlChecker when liveNodes changes. Remove ClusterState.getHostAllowList (Bruno Roustant, David Smiley) +* SOLR-17595: Fix two issues in Solr CLI that prevent Solr from starting with the techproducts example and from + correctly parsing arguments on Windows that start with -D and have multiple values separated by "," or spaces. (Christos Malliaridis) + Dependency Upgrades --------------------- (No changes) diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd index b951036a404..b1a3647f6a6 100755 --- a/solr/bin/solr.cmd +++ b/solr/bin/solr.cmd @@ -665,7 +665,6 @@ goto repeat_passthru :end_passthru set "PASSTHRU=%PASSTHRU_KEY%=%PASSTHRU_VALUES%" -echo "Passing through %PASSTHRU%" IF NOT "%SOLR_OPTS%"=="" ( set "SOLR_OPTS=%SOLR_OPTS% %PASSTHRU%" diff --git a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java index 6d7b349911c..a3e1cc39f71 100644 --- a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java +++ b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java @@ -352,7 +352,9 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception collectionName, "--type", "application/xml", - exampledocsDir.toAbsolutePath() + "/*.xml" + "--filetypes", + "xml", + exampledocsDir.toAbsolutePath().toString() }; PostTool postTool = new PostTool(); CommandLine postToolCli = SolrCLI.parseCmdLine(postTool, args); From 61609b1b599b839952fe6a8f0e163254caddd472 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Wed, 18 Dec 2024 14:26:36 -0500 Subject: [PATCH 3/3] Clarify comment since examples do not use a special directory (#2908) --- solr/bin/solr.cmd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd index b1a3647f6a6..7541e2183ac 100755 --- a/solr/bin/solr.cmd +++ b/solr/bin/solr.cmd @@ -860,8 +860,7 @@ IF NOT EXIST "%SOLR_HOME%\" ( ) ) -@REM This is quite hacky, but examples rely on a different log4j2.xml -@REM so that we can write logs for examples to %SOLR_HOME%\..\logs +@REM Handle overriding where logs are written to IF [%SOLR_LOGS_DIR%] == [] ( set "SOLR_LOGS_DIR=%SOLR_SERVER_DIR%\logs" ) ELSE (