You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/07/02 13:27:18 UTC

[GitHub] [lucene-solr] janhoy commented on a change in pull request #1574: SOLR-14566: Add request-ID to all distrib-search requests

janhoy commented on a change in pull request #1574:
URL: https://github.com/apache/lucene-solr/pull/1574#discussion_r449000598



##########
File path: solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
##########
@@ -510,14 +510,18 @@ public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throw
   }
 
   private void tagRequestWithRequestId(ResponseBuilder rb) {
-    String rid = getRequestId(rb.req);
-    if (StringUtils.isBlank(rb.req.getParams().get(CommonParams.REQUEST_ID))) {
-      ModifiableSolrParams params = new ModifiableSolrParams(rb.req.getParams());
-      params.add(CommonParams.REQUEST_ID, rid);//add rid to the request so that shards see it
-      rb.req.setParams(params);
-    }
-    if (rb.isDistrib) {
-      rb.rsp.addToLog(CommonParams.REQUEST_ID, rid); //to see it in the logs of the landing core
+    final String disableFlag = rb.req.getParams().get(CommonParams.DISABLE_REQUEST_ID);

Review comment:
       > I like a SolrParam better than a cluster property. Users might well have reasons to enable/disable it differently based on the source or type of query.
   
   If users want full per-query control, they don't need a Solr feature at all, they can just start including `whatever=1234` in their requests and track it in their logs. :) 




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org