pranavbhole commented on code in PR #15467:
URL: https://github.com/apache/druid/pull/15467#discussion_r1412413134
##########
server/src/main/java/org/apache/druid/server/QueryLifecycle.java:
##########
@@ -347,7 +347,7 @@ public void emitLogsAndMetrics(
if (e != null) {
statsMap.put("exception", e.toString());
- if (baseQuery.context().isDebug()) {
+ if (baseQuery.context().isDebug() || e.getMessage() == null) {
Review Comment:
Overall share of exceptions with null message is very low, about 0.1% among
all other meaningful exceptions.
`org.apache.druid.error.DruidException: null` is not at all useful log. I
greped regex `new *.+Exception\(\)` in code, found multiple places, eg `throw
new QueryTimeoutException();`, it can be one of them.
More conservative way of printing the log would be to log the base Throwable
exception type that DruidException receives. In fact we should print the
original exception classname along with message everywhere to make more sense
of errors and warning from DruidExceptions.
--
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]