You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/04/03 05:02:40 UTC

[doris] branch master updated: [fix](merge-on-write) fix that failed to capture_consistent_rowsets when revise tablet meta (#18283)

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

yiguolei 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 6677841b7e [fix](merge-on-write) fix that failed to capture_consistent_rowsets when revise tablet meta (#18283)
6677841b7e is described below

commit 6677841b7e7483cf6dd270df6f0b66cd0e7908ba
Author: Xin Liao <li...@126.com>
AuthorDate: Mon Apr 3 13:02:34 2023 +0800

    [fix](merge-on-write) fix that failed to capture_consistent_rowsets when revise tablet meta (#18283)
    
    Should modify _timestamped_version_tracker firstly before capture_consistent_rowsets when update delete bitmap in revise_tablet_meta.
---
 be/src/olap/tablet.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 2bf536468f..4d45672219 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -270,6 +270,8 @@ Status Tablet::revise_tablet_meta(const std::vector<RowsetSharedPtr>& to_add,
     LOG(INFO) << "begin to revise tablet. tablet_id=" << tablet_id();
     delete_rowsets(to_delete, false);
     add_rowsets(to_add);
+    // reconstruct from tablet meta
+    _timestamped_version_tracker.construct_versioned_tracker(_tablet_meta->all_rs_metas());
     if (keys_type() == UNIQUE_KEYS && enable_unique_key_merge_on_write()) {
         auto new_rowset_tree = std::make_unique<RowsetTree>();
         ModifyRowSetTree(*_rowset_tree, to_delete, to_add, new_rowset_tree.get());
@@ -316,8 +318,6 @@ Status Tablet::revise_tablet_meta(const std::vector<RowsetSharedPtr>& to_add,
             CHECK(res.ok()) << "fail to update_delete_bitmap_without_lock, res: " << res;
         }
     }
-    // reconstruct from tablet meta
-    _timestamped_version_tracker.construct_versioned_tracker(_tablet_meta->all_rs_metas());
     // clear stale rowset
     for (auto& [v, rs] : _stale_rs_version_map) {
         StorageEngine::instance()->add_unused_rowset(rs);


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