ankitsultana commented on code in PR #15762: URL: https://github.com/apache/pinot/pull/15762#discussion_r2082789764
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/MailboxContentObserver.java: ########## @@ -46,23 +46,23 @@ public class MailboxContentObserver implements StreamObserver<MailboxContent> { private static final Logger LOGGER = LoggerFactory.getLogger(MailboxContentObserver.class); private final MailboxService _mailboxService; + private final String _mailboxId; private final StreamObserver<MailboxStatus> _responseObserver; private final List<ByteBuffer> _mailboxBuffers; private transient ReceivingMailbox _mailbox; - public MailboxContentObserver(MailboxService mailboxService, StreamObserver<MailboxStatus> responseObserver) { + public MailboxContentObserver( + MailboxService mailboxService, String mailboxId, StreamObserver<MailboxStatus> responseObserver) { _mailboxService = mailboxService; + _mailboxId = mailboxId; _responseObserver = responseObserver; + _mailbox = mailboxService.getReceivingMailbox(mailboxId); _mailboxBuffers = new ArrayList<>(); } @Override public void onNext(MailboxContent mailboxContent) { - String mailboxId = mailboxContent.getMailboxId(); Review Comment: We can't remove this. During rollout, some Pinot servers will have your patch and others won't. If a receiver has the patch, it will try to extract mailboxId from context, but the sender may still be on the older version. We need to add some sort of defensive strategy here. Or, you can only initialize the _mailboxId and initialize the _mailbox in both onNext and onError. -- 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