gortiz commented on code in PR #16899:
URL: https://github.com/apache/pinot/pull/16899#discussion_r2390014949


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -305,6 +313,16 @@ static List<ByteString> toByteStrings(List<ByteBuffer> 
bytes, int maxByteStringS
     return result;
   }
 
+  @Override
+  public void close()
+      throws Exception {
+    if (!isTerminated()) {
+      LOGGER.debug("Closing gPRC mailbox without proper EOS message");
+      _closeAttempted = true;
+      _contentObserver.onError(Status.CANCELLED.asException());

Review Comment:
   No, the regular flow should be:
   
   > Sender finishes sending all data blocks, **calls `onCompleted` and sets 
the new attribute `_closeAttempted` to true**. then it is closed **and given 
`_closeAttempted` is true, `isTerminated` returns true. Therefore, onError() is 
not called.**
   
   We would only call this `onError` if we fail to call `onComplete` or 
`onError` before closing the mailbox, which should never happen (but in fact 
occurs in master). 



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