Gabriel39 commented on code in PR #18126:
URL: https://github.com/apache/doris/pull/18126#discussion_r1149959666
##########
be/src/vec/exec/scan/pip_scanner_context.h:
##########
@@ -89,10 +95,15 @@ class PipScannerContext : public vectorized::ScannerContext
{
}
}
+ bool has_enough_space_in_blocks_queue() const override {
+ return _current_used_bytes < _max_bytes_in_queue / 2;
+ }
+
private:
int _next_queue_to_feed = 0;
std::vector<std::unique_ptr<std::mutex>> _queue_mutexs;
std::vector<std::list<vectorized::BlockUPtr>> _blocks_queues;
+ std::atomic_int64_t _current_used_bytes = 0;
Review Comment:
I suspect if it's necessary to make `_current_used_bytes` atomic since this
variable is accessed almost guarded by a mutex
--
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]