MeihanLi commented on code in PR #17177:
URL: https://github.com/apache/pinot/pull/17177#discussion_r2625666630


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -329,6 +335,19 @@ protected BrokerResponse handleRequest(long requestId, 
String query, SqlNodeAndO
       throws Exception {
     _queryLogger.log(requestId, query);
 
+    String queryHash = CommonConstants.Broker.DEFAULT_QUERY_HASH;
+    if (_enableQueryFingerprinting) {
+      try {
+        QueryFingerprint queryFingerprint = 
QueryFingerprintUtils.generateFingerprint(sqlNodeAndOptions);
+        if (queryFingerprint != null) {
+          requestContext.setQueryFingerprint(queryFingerprint);
+          
LoggerConstants.QUERY_HASH_KEY.registerInMdc(queryFingerprint.getQueryHash());
+        }
+      } catch (Exception e) {
+        LOGGER.warn("Failed to generate query fingerprint for request {}: {}. 
{}", requestId, query, e.getMessage());
+      }
+    }

Review Comment:
   Fixed in the most recent commit.



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

Reply via email to