Jackie-Jiang commented on code in PR #17797:
URL: https://github.com/apache/pinot/pull/17797#discussion_r2880095881
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/ReceivingMailbox.java:
##########
@@ -74,10 +80,15 @@ public class ReceivingMailbox {
// TODO: Apply backpressure at the sender side when the queue is full.
/// The queue where blocks are going to be stored.
private final CancellableBlockingQueue _blocks;
- private long _lastArriveTime = System.currentTimeMillis();
private final StatMap<StatKey> _stats = new StatMap<>(StatKey.class);
+ /// Following variables are protected with synchronized block.
+ private long _lastArriveTime = System.currentTimeMillis();
+ private QueryThreadContext _threadContext;
+ private long _untrackedCpuTimeNs;
+ private long _untrackedAllocatedBytes;
Review Comment:
`ReceivingMailbox` can be created/accessed by both
`BaseMailboxReceiveOperator` and gRPC executor threads, and there is no
guarantee which one comes first. If data comes from wire first before
`BaseMailboxReceiveOperator` is constructed, thread context is not available
yet. Let me add more doc explaining this
--
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]