commit | 033be0fc1317b48992fb756aac7f8bd55731fc3b | [log] [tgz] |
---|---|---|
author | Jan Høydahl <janhoy@apache.org> | Tue Apr 30 18:48:55 2024 +0200 |
committer | GitHub <noreply@github.com> | Tue Apr 30 18:48:55 2024 +0200 |
tree | 356e5676882e01ffdb95bb920424b1329d3fe821 | |
parent | f1fc03fee039257172e257b79c82c2a742014525 [diff] |
SOLR-6572 Trim whitespace for shards.tolerant and leaderUrl (#2311)
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java index b06353f..b347565 100644 --- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java +++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -328,6 +328,7 @@ private void setLeaderCoreUrl(String leaderCoreUrl) { if (leaderCoreUrl != null) { + leaderCoreUrl = leaderCoreUrl.trim(); ClusterState clusterState = solrCore.getCoreContainer().getZkController() == null ? null
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java b/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java index 8a6b875..875b17c 100644 --- a/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java +++ b/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java
@@ -123,7 +123,7 @@ if (null == shardsTolerantValue || shardsTolerantValue.equals(REQUIRE_ZK_CONNECTED)) { return false; } else { - return StrUtils.parseBool(shardsTolerantValue); // throw an exception if non-boolean + return StrUtils.parseBool(shardsTolerantValue.trim()); // throw an exception if non-boolean } } }