gortiz commented on code in PR #15037:
URL: https://github.com/apache/pinot/pull/15037#discussion_r1975628058
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/streaming/StreamingInstanceResponseOperator.java:
##########
@@ -89,11 +89,12 @@ protected InstanceResponseBlock getNextBlock() {
}
} catch (EarlyTerminationException e) {
Exception killedErrorMsg =
Tracing.getThreadAccountant().getErrorStatus();
- return new InstanceResponseBlock(new ExceptionResultsBlock(new
QueryCancelledException(
- "Cancelled while streaming results" + (killedErrorMsg == null ?
StringUtils.EMPTY : " " + killedErrorMsg),
- e)));
+ QueryErrorMessage errMsg =
QueryErrorMessage.safeMsg(QueryErrorCode.QUERY_CANCELLATION,
+ "Cancelled while streaming results" + (killedErrorMsg == null ?
StringUtils.EMPTY : " " + killedErrorMsg));
+ return new InstanceResponseBlock(new ExceptionResultsBlock(errMsg));
} catch (Exception e) {
- return new InstanceResponseBlock(new
ExceptionResultsBlock(QueryException.INTERNAL_ERROR, e));
+ QueryErrorMessage errMsg =
QueryErrorMessage.safeMsg(QueryErrorCode.INTERNAL, e.getMessage());
+ return new InstanceResponseBlock(new ExceptionResultsBlock(errMsg));
Review Comment:
I don't think we should log in an early terminate exception. Probably we
should log in the other case. I'm not focused on logging in this PR.
Let me add it here and think whether that is correct in a future PR
--
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]