This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new ac6fa854c24 Revert "[improve](load) lock free flush_async and 
wait_flush in LoadChannel (#33389)" (#33871)
ac6fa854c24 is described below

commit ac6fa854c241a6eff8adf9bb440b39c3aecba102
Author: Xinyi Zou <[email protected]>
AuthorDate: Fri Apr 19 22:21:35 2024 +0800

    Revert "[improve](load) lock free flush_async and wait_flush in LoadChannel 
(#33389)" (#33871)
    
    This reverts commit 529260b82832e237c85867c783f410fc82a24627.
---
 be/src/runtime/load_channel.h | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/be/src/runtime/load_channel.h b/be/src/runtime/load_channel.h
index 9e126d2e21c..4f0c0cc758c 100644
--- a/be/src/runtime/load_channel.h
+++ b/be/src/runtime/load_channel.h
@@ -100,22 +100,19 @@ public:
 
     bool is_high_priority() const { return _is_high_priority; }
 
-    std::shared_ptr<TabletsChannel> get_load_channel(int64_t index_id) {
-        std::lock_guard<std::mutex> l(_lock);
-        return _tablets_channels[index_id];
-    }
-
     void flush_memtable_async(int64_t index_id, int64_t tablet_id) {
-        auto channel = get_load_channel(index_id);
-        if (channel != nullptr) {
-            channel->flush_memtable_async(tablet_id);
+        std::lock_guard<std::mutex> l(_lock);
+        auto it = _tablets_channels.find(index_id);
+        if (it != _tablets_channels.end()) {
+            it->second->flush_memtable_async(tablet_id);
         }
     }
 
     void wait_flush(int64_t index_id, int64_t tablet_id) {
-        auto channel = get_load_channel(index_id);
-        if (channel != nullptr) {
-            channel->wait_flush(tablet_id);
+        std::lock_guard<std::mutex> l(_lock);
+        auto it = _tablets_channels.find(index_id);
+        if (it != _tablets_channels.end()) {
+            it->second->wait_flush(tablet_id);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to