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


##########
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:
   The reason for the test failure was that we were calling `complete` when 
using pipeline breakers. Here, on the `close` method, I'm cancelling the 
connection precisely for that reason: If we execute this code means some path 
forgot to call `complete`, which is an error.
   
   > Closing the sending mailbox only means its work is done right?
   
   Or not, we may call close after an exception, in which case we should have 
called `cancel`, but if we execute this line it means we forgot to call 
`cancel` or `complete`.



##########
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:
   The reason for the test failure was that we were calling `complete` when 
using pipeline breakers. Here, on the `close` method, I'm cancelling the 
connection precisely for that reason: If we execute this code, it means some 
path forgot to call `complete`, which is an error.
   
   > Closing the sending mailbox only means its work is done right?
   
   Or not, we may call close after an exception, in which case we should have 
called `cancel`, but if we execute this line it means we forgot to call 
`cancel` or `complete`.



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