61yao commented on code in PR #10108:
URL: https://github.com/apache/pinot/pull/10108#discussion_r1087530247


##########
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:
   This cannot be removed. it is an ack sent back to close grpc



-- 
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]

Reply via email to