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

eldenmoon 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 19ab0c229ea branch-3.0: [Optimize](Variant) move merge_rowsets_schema 
to sync_tablet_rowsets to make schema more accurate (#43634)
19ab0c229ea is described below

commit 19ab0c229ea5aad9164094c748717f91c92c0b5b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 12 10:04:49 2024 +0800

    branch-3.0: [Optimize](Variant) move merge_rowsets_schema to 
sync_tablet_rowsets to make schema more accurate (#43634)
    
    Cherry-picked from #43580
    
    Co-authored-by: eldenmoon <[email protected]>
---
 be/src/cloud/cloud_meta_mgr.cpp | 1 +
 be/src/cloud/cloud_tablet.cpp   | 3 ---
 be/src/cloud/cloud_tablet.h     | 6 +++---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/be/src/cloud/cloud_meta_mgr.cpp b/be/src/cloud/cloud_meta_mgr.cpp
index 22b96b0d4d7..27564ef3923 100644
--- a/be/src/cloud/cloud_meta_mgr.cpp
+++ b/be/src/cloud/cloud_meta_mgr.cpp
@@ -553,6 +553,7 @@ Status CloudMetaMgr::sync_tablet_rowsets(CloudTablet* 
tablet, bool warmup_delta_
                 bool version_overlap =
                         tablet->max_version_unlocked() >= 
rowsets.front()->start_version();
                 tablet->add_rowsets(std::move(rowsets), version_overlap, 
wlock, warmup_delta_data);
+                RETURN_IF_ERROR(tablet->merge_rowsets_schema());
             }
             tablet->last_base_compaction_success_time_ms = 
stats.last_base_compaction_time_ms();
             tablet->last_cumu_compaction_success_time_ms = 
stats.last_cumu_compaction_time_ms();
diff --git a/be/src/cloud/cloud_tablet.cpp b/be/src/cloud/cloud_tablet.cpp
index 71030e3bf26..652a081a8c4 100644
--- a/be/src/cloud/cloud_tablet.cpp
+++ b/be/src/cloud/cloud_tablet.cpp
@@ -164,9 +164,6 @@ Status CloudTablet::sync_rowsets(int64_t query_version, 
bool warmup_delta_data)
         clear_cache();
     }
 
-    // Merge all rowset schemas within a CloudTablet
-    RETURN_IF_ERROR(merge_rowsets_schema());
-
     return st;
 }
 
diff --git a/be/src/cloud/cloud_tablet.h b/be/src/cloud/cloud_tablet.h
index 3add983ee42..3433c357322 100644
--- a/be/src/cloud/cloud_tablet.h
+++ b/be/src/cloud/cloud_tablet.h
@@ -191,6 +191,9 @@ public:
 
     const auto& rowset_map() const { return _rs_version_map; }
 
+    // Merge all rowset schemas within a CloudTablet
+    Status merge_rowsets_schema();
+
     int64_t last_sync_time_s = 0;
     int64_t last_load_time_ms = 0;
     int64_t last_base_compaction_success_time_ms = 0;
@@ -211,9 +214,6 @@ private:
 
     Status sync_if_not_running();
 
-    // Merge all rowset schemas within a CloudTablet
-    Status merge_rowsets_schema();
-
     CloudStorageEngine& _engine;
 
     // this mutex MUST ONLY be used when sync meta


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

Reply via email to