You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2019/12/09 16:00:26 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #2414: fix several races in stream load that could cause BE crash

morningman commented on a change in pull request #2414: fix several races in stream load that could cause BE crash
URL: https://github.com/apache/incubator-doris/pull/2414#discussion_r355532320
 
 

 ##########
 File path: be/src/util/counter_cond_variable.hpp
 ##########
 @@ -60,18 +57,13 @@ class CounterCondVariable {
         _count += inc;
     }
 
-    // decrease the counter, and notify all waiters
+    // decrease the counter, and notify all waiters when counter <= 0
     void dec(int dec = 1) {
         std::unique_lock<std::mutex> lock(_lock);
         _count -= dec;
-        _cv.notify_all();
-    }
-
-    // decrease the counter to zero
-    void dec_to_zero() {
 
 Review comment:
   I understand that the reason you removed the `dec_to_zero()` method is to hope that all related memtables can be sequentially completed through `memtable_flush_queue`. To ensure that there will be no related memtable still in the flush queue before `delta_writer` is closed?
   
   But even after the `delta_writer` is closed, is there any related memtable in the flush queue, does it matter? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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