walterddr commented on code in PR #10108: URL: https://github.com/apache/pinot/pull/10108#discussion_r1092333680
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxContentStreamObserver.java: ########## @@ -151,22 +152,22 @@ public void onNext(Mailbox.MailboxContent mailboxContent) { @Override public void onError(Throwable e) { + initError(e); + } + + @Override + public void onCompleted() { + _isCompleted.set(true); + } + + private void initError(Throwable e) { try { _errorLock.writeLock().lock(); _errorContent = createErrorContent(e); - _gotMailCallback.accept(_mailboxId); - // TODO: close the stream. - throw new RuntimeException(e); - } catch (IOException ioe) { - throw new RuntimeException("Unable to encode exception for cascade reporting: " + e, ioe); + } catch (IOException ioException) { + LOGGER.error("Unexpected error", ioException); } finally { _errorLock.writeLock().unlock(); } } - - @Override - public void onCompleted() { - _isCompleted.set(true); - _responseObserver.onCompleted(); Review Comment: +1 -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org