xiangfu0 commented on code in PR #18519:
URL: https://github.com/apache/pinot/pull/18519#discussion_r3281051013


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -125,7 +169,7 @@ private boolean sendInternal(MseBlock block, 
List<DataBuffer> serializedStats) {
       _contentObserver = getContentObserver();

Review Comment:
   This lazy initialization is still racy with `cancel()`: both paths do a 
plain `_contentObserver == null` check and can each open their own gRPC stream 
for the same mailbox. If that happens, the cancel EOS / `onCompleted()` can run 
on a different `ClientCallStreamObserver` than the data path uses, so the 
receiver can miss the cancellation or see two concurrent streams for one 
mailbox. Please guard observer creation under `_readyLock` (or another one-time 
init primitive) so sender and cancel share a single stream.



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