walterddr commented on code in PR #9422:
URL: https://github.com/apache/pinot/pull/9422#discussion_r981463125
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxSendOperator.java:
##########
@@ -192,14 +199,17 @@ private static List<BaseDataBlock>
constructPartitionedDataBlock(BaseDataBlock d
}
}
- private void sendDataTableBlock(ServerInstance serverInstance, BaseDataBlock
dataBlock)
+ private void sendDataTableBlock(ServerInstance serverInstance,
TransferableBlock block)
throws IOException {
+ List<TransferableBlock> chunks = TransferableBlockUtils.splitBlock(block,
_maxBlockSize);
String mailboxId = toMailboxId(serverInstance);
- SendingMailbox<Mailbox.MailboxContent> sendingMailbox =
_mailboxService.getSendingMailbox(mailboxId);
- Mailbox.MailboxContent mailboxContent = toMailboxContent(mailboxId,
dataBlock);
- sendingMailbox.send(mailboxContent);
- if
(mailboxContent.getMetadataMap().containsKey(ChannelUtils.MAILBOX_METADATA_END_OF_STREAM_KEY))
{
- sendingMailbox.complete();
+ for (TransferableBlock chunk : chunks) {
+ SendingMailbox<Mailbox.MailboxContent> sendingMailbox =
_mailboxService.getSendingMailbox(mailboxId);
+ Mailbox.MailboxContent mailboxContent = toMailboxContent(mailboxId,
chunk.getDataBlock());
+ sendingMailbox.send(mailboxContent);
+ if
(mailboxContent.getMetadataMap().containsKey(ChannelUtils.MAILBOX_METADATA_END_OF_STREAM_KEY))
{
+ sendingMailbox.complete();
+ }
Review Comment:
actually let's dont use this. just use
`TransferableBlockUtils.isEndOfStream()` to check this.
the ChannelUtils. configuration is used by mailbox to check if a stream has
ended (since it doesn't know how to parse the MailboxContent).
in operator it does know the mailbox content contains a transferable block
so we should check with that
--
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]