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


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxContentObserver.java:
##########
@@ -84,6 +84,9 @@ public void onNext(MailboxContent mailboxContent) {
           cancelStream();
           break;
         case FIRST_ERROR:
+          
_responseObserver.onNext(MailboxStatus.newBuilder().setMailboxId(mailboxId)
+              
.putMetadata(ChannelUtils.MAILBOX_METADATA_REQUEST_EARLY_TERMINATE, 
"true").build());
+          cancelStream();

Review Comment:
   If the sender sees a `FIRST_ERROR`, it means it has queued an Error message. 
By our own protocol definition, that means the sender should not send more 
blocks, which means the gRPC thread will not call `offer` again and therefore 
it will never see an `ERROR`.
   
   Remember that doesn't mean `ERROR` is never seen:
   - If we, due to a bug, send a block after the error block, then when the 
sender offers that block it should see `ERROR`. 
   - The sender can see `ERROR` for other reasons. For example, the thread 
could be interrupted while is waiting to add more blocks into the queue.



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