yiguolei commented on code in PR #35642:
URL: https://github.com/apache/doris/pull/35642#discussion_r1622513943


##########
be/src/pipeline/exec/exchange_sink_buffer.cpp:
##########
@@ -50,35 +50,40 @@ namespace vectorized {
 BroadcastPBlockHolder::~BroadcastPBlockHolder() {
     // lock the parent queue, if the queue could lock success, then return the 
block
     // to the queue, to reuse the block
-    std::shared_ptr<BroadcastPBlockHolderQueue> tmp_queue = 
_parent_creator.lock();
-    if (tmp_queue != nullptr) {
-        
tmp_queue->push(BroadcastPBlockHolder::create_shared(std::move(_pblock)));
+    std::shared_ptr<BroadcastPBlockHolderMemLimiter> limiter = 
_parent_creator.lock();
+    if (limiter != nullptr) {
+        limiter->remove(*this);
     }
     // If the queue already deconstruted, then release pblock automatically 
since it
     // is a unique ptr.
 }
 
-void BroadcastPBlockHolderQueue::push(std::shared_ptr<BroadcastPBlockHolder> 
holder) {
+void BroadcastPBlockHolderMemLimiter::add(BroadcastPBlockHolder& holder) {

Review Comment:
   maybe rename this method to acquire and rename remove method to release?



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to