shauryachats commented on code in PR #15762:
URL: https://github.com/apache/pinot/pull/15762#discussion_r2083284646


##########
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:
   That makes sense. We have to assume that the receiver will not get always 
get the mailboxId through the headers, so I'll keep both the `mailboxId` and 
`mailbox` logic in `onNext()` in case `mailboxId` is null.



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