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

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new b73bb25dcc [fix](load) fix that flush memtable concurrently may cause 
data inconsistency (#15005)
b73bb25dcc is described below

commit b73bb25dcc3c36fd06cea9e106e35c4e5cf0991f
Author: Xin Liao <liaoxin...@126.com>
AuthorDate: Tue Dec 13 09:27:35 2022 +0800

    [fix](load) fix that flush memtable concurrently may cause data 
inconsistency (#15005)
---
 be/src/olap/memtable_flush_executor.cpp          | 5 +++--
 be/src/olap/task/engine_publish_version_task.cpp | 9 ++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/be/src/olap/memtable_flush_executor.cpp 
b/be/src/olap/memtable_flush_executor.cpp
index 1dd4859e5a..c2fe380b1b 100644
--- a/be/src/olap/memtable_flush_executor.cpp
+++ b/be/src/olap/memtable_flush_executor.cpp
@@ -90,9 +90,10 @@ void FlushToken::_flush_memtable(MemTable* memtable, int64_t 
submit_task_time) {
     Status s = memtable->flush();
     if (!s) {
         LOG(WARNING) << "Flush memtable failed with res = " << s;
+        // If s is not ok, ignore the code, just use other code is ok
+        _flush_status.store(OLAP_ERR_OTHER_ERROR);
     }
-    // If s is not ok, ignore the code, just use other code is ok
-    _flush_status.store(s.ok() ? OLAP_SUCCESS : OLAP_ERR_OTHER_ERROR);
+
     if (_flush_status.load() != OLAP_SUCCESS) {
         return;
     }
diff --git a/be/src/olap/task/engine_publish_version_task.cpp 
b/be/src/olap/task/engine_publish_version_task.cpp
index 25b55955c6..4e786a0455 100644
--- a/be/src/olap/task/engine_publish_version_task.cpp
+++ b/be/src/olap/task/engine_publish_version_task.cpp
@@ -227,11 +227,10 @@ void TabletPublishTxnTask::handle() {
         return;
     }
     _engine_publish_version_task->add_succ_tablet_id(_tablet_info.tablet_id);
-    VLOG_NOTICE << "publish version successfully on tablet. tablet=" << 
_tablet->full_name()
-                << ", transaction_id=" << _transaction_id << ", version=" << 
_version.first
-                << ", res=" << publish_status;
-
-    return;
+    LOG(INFO) << "publish version successfully on tablet"
+              << ", table_id=" << _tablet->table_id() << ", tablet=" << 
_tablet->full_name()
+              << ", transaction_id=" << _transaction_id << ", version=" << 
_version.first
+              << ", num_rows=" << _rowset->num_rows() << ", res=" << 
publish_status;
 }
 
 } // namespace doris


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

Reply via email to