abhishekrb19 commented on code in PR #18841:
URL: https://github.com/apache/druid/pull/18841#discussion_r2620759570
##########
server/src/main/java/org/apache/druid/client/DirectDruidClient.java:
##########
@@ -437,11 +437,13 @@ private long checkQueryTimeout()
private void checkTotalBytesLimit(long bytes)
{
- if (maxScatterGatherBytes < Long.MAX_VALUE &&
totalBytesGathered.addAndGet(bytes) > maxScatterGatherBytes) {
+ final long currentTotalBytesGathered =
totalBytesGathered.addAndGet(bytes);
+ if (currentTotalBytesGathered > 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: %d",
query.getId(),
- url
+ url,
+ currentTotalBytesGathered
);
Review Comment:
While at it, let's also include the `maxScatterGatherBytes` value in the
exception message.
nit: use `[]` to interpolate per Druid
[style-guide](https://github.com/apache/druid/blob/master/dev/style-conventions.md#message-formatting-for-logs-and-exceptions).
```
Query[%s] url[%s] total bytes gathered[%,d] exceeds
maxScatterGatherBytes[%,d]
```
--
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]