FrankChen021 commented on code in PR #20832:
URL: https://github.com/apache/druid/pull/20832#discussion_r4480548846
##########
server/src/main/java/org/apache/druid/server/QueryLifecycle.java:
##########
@@ -605,10 +611,44 @@ public static boolean shouldLogStackTrace(final Throwable
e, final QueryContext
if (queryContext.isDebug() || e.getMessage() == null) {
return true;
} else if (e instanceof DruidException) {
- final DruidException.Persona persona = ((DruidException)
e).getTargetPersona();
- return persona == DruidException.Persona.OPERATOR || persona ==
DruidException.Persona.DEVELOPER;
+ final DruidException de = (DruidException) e;
+ final DruidException.Persona persona = de.getTargetPersona();
+ if (persona == DruidException.Persona.OPERATOR) {
+ return de.getCategory() != DruidException.Category.UNSUPPORTED;
Review Comment:
[P2] Preserve stacks for generic operator unsupported failures
**Finding:** `shouldLogStackTrace` now returns false for every
`DruidException` targeting `OPERATOR` with category `UNSUPPORTED`. This
includes `QueryHandler.buildSQLPlanningError`, which uses that classification
for an unhandled Calcite `CannotPlanException` and tells operators to see
broker logs; SQL and native query logging therefore emit only a stackless WARN
and hide the cause needed to diagnose a planner or server defect.
**Suggestion:** Keep stack traces for generic `OPERATOR`/`UNSUPPORTED`
failures and identify the missing-extension case explicitly before suppressing
its stack.
--
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]