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


##########
be/src/pipeline/local_exchange/local_exchanger.h:
##########
@@ -213,13 +213,16 @@ class LocalExchangeSinkLocalState;
  */
 struct BlockWrapper {
     ENABLE_FACTORY_CREATOR(BlockWrapper);
-    BlockWrapper(vectorized::Block&& data_block_) : 
data_block(std::move(data_block_)) {}
-    ~BlockWrapper() { DCHECK_EQ(ref_count.load(), 0); }
-    void ref(int delta) { ref_count += delta; }
-    void unref(LocalExchangeSharedState* shared_state, size_t allocated_bytes, 
int channel_id) {
-        if (ref_count.fetch_sub(1) == 1 && shared_state != nullptr) {
+    BlockWrapper(vectorized::Block&& data_block_, LocalExchangeSharedState* 
shared_state_)
+            : data_block(std::move(data_block_)),
+              shared_state(shared_state_),
+              allocated_bytes(data_block.allocated_bytes()) {}

Review Comment:
   为什么不在构建的时候,就去add memory usage?
   如果我们在record channel 里加,那么我们再析构里- memory usage 就是有问题的



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