gus-asf commented on code in PR #2666:
URL: https://github.com/apache/solr/pull/2666#discussion_r1773584764


##########
solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java:
##########
@@ -80,6 +94,39 @@ public HttpShardHandler(HttpShardHandlerFactory 
httpShardHandlerFactory) {
     shardToURLs = new HashMap<>();
   }
 
+  /**
+   * Parse the {@value ShardParams#SHARDS_TOLERANT} param from 
<code>params</code> as a boolean;
+   * accepts {@value ShardParams#REQUIRE_ZK_CONNECTED} as a valid value 
indicating <code>false
+   * </code>.
+   *
+   * <p>By default, returns <code>false</code> when {@value 
ShardParams#SHARDS_TOLERANT} is not set
+   * in <code>
+   * params</code>.
+   */
+  public static boolean getShardsTolerantAsBool(SolrQueryRequest req) {
+    String shardsTolerantValue = 
req.getParams().get(ShardParams.SHARDS_TOLERANT);
+    if (null == shardsTolerantValue
+        || 
shardsTolerantValue.trim().equals(ShardParams.REQUIRE_ZK_CONNECTED)) {

Review Comment:
   Sorry, let me be clearer. That .trim() was retained only because it was part 
of the (recent) changes for that ticket that I received in a merge from main: 
(https://github.com/apache/solr/pull/2311/files) If you are confident that the 
change made in SOLR-6572 was in error, we can remove it. I simply trusted the 
change made by @janhoy 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to