walterddr commented on code in PR #9064: URL: https://github.com/apache/pinot/pull/9064#discussion_r928123071
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java: ########## @@ -120,14 +108,17 @@ public String toExplainString() { protected TransferableBlock getNextBlock() { try { cumulateAggregationBlocks(); - return new TransferableBlock(toResultBlock()); + return toResultBlock(); } catch (Exception e) { return TransferableBlockUtils.getErrorTransferableBlock(e); } } - private BaseDataBlock toResultBlock() + private TransferableBlock toResultBlock() throws IOException { + if (_upstreamErrorBlock != null) { Review Comment: This is tricky, so long-story short. the mailbox send/receive is only special because of the "random distribution" exchange type. without it. the connection will be fully connected (for data block) - in either broadcast or hash distribution, all sender servers will send data to all receiver servers - in singleton distribution, the list of sender and receiver will only do self-connection. - where as in random distribution, we send data to one of the receiver servers however, for metadata block. EXACTLY BECAUSE the behavior of random distribution, we need to broadcast the end-of-stream info to every receiver since they might've still expect a data block to come if we dont do so. so in summary - error blocks are broadcast to all receivers. - except for singleton, since they established the 1-to-1 relation at the beginning. -- 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