You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2022/12/13 01:27:42 UTC

[doris] branch master updated: [fix](load) fix that flush memtable concurrently may cause data inconsistency (#15005)

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 0d5291801d [fix](load) fix that flush memtable concurrently may cause data inconsistency (#15005)
0d5291801d is described below

commit 0d5291801d65b8164988452089c35ee6d5102695
Author: Xin Liao <li...@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          | 4 ++--
 be/src/olap/task/engine_publish_version_task.cpp | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/be/src/olap/memtable_flush_executor.cpp b/be/src/olap/memtable_flush_executor.cpp
index 52a5ffdda2..3de348e9f6 100644
--- a/be/src/olap/memtable_flush_executor.cpp
+++ b/be/src/olap/memtable_flush_executor.cpp
@@ -91,9 +91,9 @@ 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(ErrorCode::INTERNAL_ERROR);
     }
-    // If s is not ok, ignore the code, just use other code is ok
-    _flush_status.store(s.ok() ? OK : ErrorCode::INTERNAL_ERROR);
     if (_flush_status.load() != OK) {
         return;
     }
diff --git a/be/src/olap/task/engine_publish_version_task.cpp b/be/src/olap/task/engine_publish_version_task.cpp
index d8687f9839..0422912944 100644
--- a/be/src/olap/task/engine_publish_version_task.cpp
+++ b/be/src/olap/task/engine_publish_version_task.cpp
@@ -228,11 +228,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-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org