fsparv commented on code in PR #2666:
URL: https://github.com/apache/solr/pull/2666#discussion_r1737216013
##########
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:
https://issues.apache.org/jira/browse/SOLR-6572
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]