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

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c24e5585c3 [fix](load) clear and notify when an error happens in 
flushing (#13589)
c24e5585c3 is described below

commit c24e5585c3a0346b7e1451087b9f9688ab57dd04
Author: Yongqiang YANG <98214048+dataroar...@users.noreply.github.com>
AuthorDate: Tue Oct 25 13:39:17 2022 +0800

    [fix](load) clear and notify when an error happens in flushing (#13589)
---
 be/src/runtime/tablets_channel.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/be/src/runtime/tablets_channel.cpp 
b/be/src/runtime/tablets_channel.cpp
index d833b5d887..9023c100f1 100644
--- a/be/src/runtime/tablets_channel.cpp
+++ b/be/src/runtime/tablets_channel.cpp
@@ -299,12 +299,14 @@ Status 
TabletsChannel::reduce_mem_usage(TabletWriterAddResult* response) {
         }
     }
 
+    Status st = Status::OK();
     for (auto writer : writers_to_wait_flush) {
-        Status st = writer->wait_flush();
+        st = writer->wait_flush();
         if (!st.ok()) {
-            return Status::InternalError(
+            st = Status::InternalError(
                     "failed to reduce mem consumption by flushing memtable. 
err: {}",
                     st.to_string());
+            break;
         }
     }
 
@@ -314,7 +316,7 @@ Status 
TabletsChannel::reduce_mem_usage(TabletWriterAddResult* response) {
         _reduce_memory_cond.notify_all();
     }
 
-    return Status::OK();
+    return st;
 }
 
 Status TabletsChannel::_open_all_writers(const PTabletWriterOpenRequest& 
request) {


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

Reply via email to