janhoy commented on code in PR #1930: URL: https://github.com/apache/solr/pull/1930#discussion_r1329781429
########## solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java: ########## @@ -343,4 +343,16 @@ public Collection<Api> getApis() { return Collections.singleton( new ApiBag.ReqHandlerToApi(this, ApiBag.constructSpec(pluginInfo))); } + + /** + * Checks whether the given request is an internal request to a shard. We rely on the fact that an + * internal search request to a shard contains the param "isShard", and an internal update request + * to a shard contains the param "distrib.from". + * + * @return true if request is internal + */ + public static boolean isInternalShardRequest(SolrQueryRequest req) { Review Comment: > Perhaps this could even be protected and non-static We reference this method from unit tests on the SolrQueryRequest, without an instance of a request hander, so this is a bit hard. It would of course be possible to create another instance method that delegates to this static one, but that can also be done later when need arises. -- 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