abhishekrb19 commented on code in PR #18841:
URL: https://github.com/apache/druid/pull/18841#discussion_r2615911648


##########
server/src/main/java/org/apache/druid/client/DirectDruidClient.java:
##########
@@ -439,9 +439,10 @@ private void checkTotalBytesLimit(long bytes)
         {
           if (maxScatterGatherBytes < Long.MAX_VALUE && 
totalBytesGathered.addAndGet(bytes) > maxScatterGatherBytes) {
             String msg = StringUtils.format(
-                "Query[%s] url[%s] max scatter-gather bytes limit reached.",
+                "Query[%s] url[%s] max scatter-gather bytes limit reached. 
Total bytes gathered are equal to: %d",
                 query.getId(),
-                url
+                url,
+                totalBytesGathered.get()
             );

Review Comment:
   We can assign the result of total bytes gathered by this query and also log 
`maxScatterGatherBytes` while at it. Something like: 
   ```suggestion
             final long currentTotalBytesGathered = 
totalBytesGathered.addAndGet(bytes);
             if (maxScatterGatherBytes < Long.MAX_VALUE && 
currentTotalBytesGathered > maxScatterGatherBytes) {
               String msg = StringUtils.format(
                   "Query[%s] url[%s] maxScatterGatherBytes[%,d] limit reached. 
Total bytes gathered: [%,d]",
                   query.getId(),
                   url,
                   maxScatterGatherBytes,
                   currentTotalBytesGathered
               );
   ```



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