Gabriel39 commented on code in PR #57888:
URL: https://github.com/apache/doris/pull/57888#discussion_r2532451087


##########
be/src/vec/runtime/vdata_stream_recvr.h:
##########
@@ -290,13 +253,35 @@ class VDataStreamRecvr::SenderQueue {
         BlockItem(std::unique_ptr<PBlock>&& pblock, size_t block_byte_size)
                 : _block(nullptr), _pblock(std::move(pblock)), 
_block_byte_size(block_byte_size) {}
 
+        void set_done(google::protobuf::Closure* done) {
+            // The done callback is only set when the queue memory limit is 
exceeded.
+            _done_cb = done;
+            _wait_timer.start();
+        }
+
+        void call_done(VDataStreamRecvr* recvr) {
+            if (_done_cb != nullptr) {
+                _done_cb->Run();
+                _done_cb = nullptr;
+                _wait_timer.stop();
+                int64_t elapse_time = _wait_timer.elapsed_time();
+                if (recvr->_max_wait_to_process_time->value() < elapse_time) {

Review Comment:
   We need a `CAS` here



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