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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 1ac212cdd16 branch-3.0: [fix](memtable) revert #47860 and fix #47610 
#48489 (#48637)
1ac212cdd16 is described below

commit 1ac212cdd1638ab8005e060d94c4d21d149098b6
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Mar 10 14:51:37 2025 +0800

    branch-3.0: [fix](memtable) revert #47860 and fix #47610 #48489 (#48637)
    
    Cherry-picked from #48489
    
    Co-authored-by: Kaijie Chen <[email protected]>
---
 be/src/olap/memtable_writer.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/be/src/olap/memtable_writer.cpp b/be/src/olap/memtable_writer.cpp
index 14b656b230f..3dc88ae668f 100644
--- a/be/src/olap/memtable_writer.cpp
+++ b/be/src/olap/memtable_writer.cpp
@@ -126,7 +126,7 @@ Status MemTableWriter::write(const vectorized::Block* block,
     //    thus preventing potential crashes
     if (!st.ok()) [[unlikely]] {
         std::lock_guard<SpinLock> l(_mem_table_ptr_lock);
-        _mem_table.reset();
+        _reset_mem_table();
         return st;
     }
 
@@ -180,11 +180,6 @@ Status MemTableWriter::flush_async() {
         return _cancel_status;
     }
 
-    // _mem_table may be null after write failure triggers reset
-    if (_mem_table == nullptr) {
-        return Status::OK();
-    }
-
     VLOG_NOTICE << "flush memtable to reduce mem consumption. memtable size: "
                 << _mem_table->memory_usage() << ", tablet: " << _req.tablet_id
                 << ", load id: " << print_id(_req.load_id);


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

Reply via email to