gortiz commented on code in PR #15533:
URL: https://github.com/apache/pinot/pull/15533#discussion_r2042140226
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -131,9 +132,8 @@ public void cancel(Throwable t) {
try {
String msg = t != null ? t.getMessage() : "Unknown";
// NOTE: DO NOT use onError() because it will terminate the stream, and
receiver might not get the callback
- _contentObserver.onNext(toMailboxContent(
- ErrorMseBlock.fromException(new RuntimeException("Cancelled by
sender with exception: " + msg, t)),
- List.of()));
+ _contentObserver.onNext(toMailboxContent(ErrorMseBlock.fromException(
+ new QueryCancelledException("Cancelled by sender with exception: " +
msg)), List.of()));
Review Comment:
Nit: you can just create the error map here or create a new constructor
factory method that accepts the error code and message instead of allocating a
new exception that will be not referenced after that.
--
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]