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

eldenmoon 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 737bb82d5eb [Optimize](Variant) move merge_rowsets_schema to 
sync_tablet_rowsets to make schema more accurate (#43580)
737bb82d5eb is described below

commit 737bb82d5eb7cb80def50f2e78c3883c43a43d14
Author: lihangyu <lihan...@flywheels.com>
AuthorDate: Mon Nov 11 21:14:41 2024 +0800

    [Optimize](Variant) move merge_rowsets_schema to sync_tablet_rowsets to 
make schema more accurate (#43580)
    
    Related PR: #42856 previous PR only merge schema in
    `CloudTablet::sync_rowsets` but `CloudTablet:: sync_tablet_rowsets ` may
    already done by other logic
    
    
    Co-authored-by: eldenmoon <lihan...@selectdb.com>
---
 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 ae98a7f6058..dc1ac169200 100644
--- a/be/src/cloud/cloud_meta_mgr.cpp
+++ b/be/src/cloud/cloud_meta_mgr.cpp
@@ -555,6 +555,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 5552b78a0c9..ebd1fea3dd9 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 5f4785b62d2..0fde2f5b1d9 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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to