ankitsultana commented on code in PR #10322:
URL: https://github.com/apache/pinot/pull/10322#discussion_r1128201146


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/exchange/BlockExchange.java:
##########
@@ -93,5 +100,25 @@ protected void sendBlock(SendingMailbox<TransferableBlock> 
sendingMailbox, Trans
     }
   }
 
-  protected abstract void route(List<SendingMailbox<TransferableBlock>> 
destinations, TransferableBlock block);
+  protected abstract void route(List<SendingMailbox<TransferableBlock>> 
destinations, TransferableBlock block)
+      throws Exception;
+
+  // Called when the OpChain gracefully returns.
+  // TODO: This is a no-op right now.
+  public void close() {
+    for (SendingMailbox sendingMailbox : _sendingMailboxes) {
+      if (sendingMailbox.isInitialized() && !sendingMailbox.isClosed()) {
+        LOGGER.info("SendingMailbox={} was not closed presumably because 
receiver hasn't completed processing",
+            sendingMailbox.getMailboxId());
+      }
+    }
+  }
+
+  public void cancel(Throwable t) {
+    for (SendingMailbox sendingMailbox : _sendingMailboxes) {
+      if (sendingMailbox.isInitialized() && !sendingMailbox.isClosed()) {
+        sendingMailbox.cancel(t);
+      }
+    }
+  }

Review Comment:
   There's no release for that since the ownership is not with 
`MailboxService`. By design the sending/receiving mailbox are asymmetric.



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

Reply via email to