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 141e6fedea9 [enhancement](meta) Sync tablet meta even if local state 
is not running (#45821)
141e6fedea9 is described below

commit 141e6fedea989a868959da479b449728101419f6
Author: Siyang Tang <[email protected]>
AuthorDate: Wed Dec 25 22:21:20 2024 +0800

    [enhancement](meta) Sync tablet meta even if local state is not running 
(#45821)
    
    Avoid a running tablet keep not running state on single one BE with no
    query. Even if it is a tablet with high compaction score, compaction
    will fail on this BE since not running state.
    
    Before this PR, scheduled tablet meta sync will skip not running
    tablets. In this PR, we include those tablets in meta sync procedure to
    avoid long-term inaccurate tablet state.
---
 be/src/cloud/cloud_tablet.cpp     | 3 ---
 be/src/cloud/cloud_tablet_mgr.cpp | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/be/src/cloud/cloud_tablet.cpp b/be/src/cloud/cloud_tablet.cpp
index 134d44c921b..f0f6f92e9d0 100644
--- a/be/src/cloud/cloud_tablet.cpp
+++ b/be/src/cloud/cloud_tablet.cpp
@@ -873,9 +873,6 @@ Status CloudTablet::sync_meta() {
         }
         return st;
     }
-    if (tablet_meta->tablet_state() != TABLET_RUNNING) { // impossible
-        return Status::InternalError("invalid tablet state. tablet_id={}", 
tablet_id());
-    }
 
     auto new_ttl_seconds = tablet_meta->ttl_seconds();
     if (_tablet_meta->ttl_seconds() != new_ttl_seconds) {
diff --git a/be/src/cloud/cloud_tablet_mgr.cpp 
b/be/src/cloud/cloud_tablet_mgr.cpp
index e7a7d254f3f..f60d0eeb5ba 100644
--- a/be/src/cloud/cloud_tablet_mgr.cpp
+++ b/be/src/cloud/cloud_tablet_mgr.cpp
@@ -261,9 +261,6 @@ void CloudTabletMgr::sync_tablets(const CountDownLatch& 
stop_latch) {
 
     for (auto& weak_tablet : weak_tablets) {
         if (auto tablet = weak_tablet.lock()) {
-            if (tablet->tablet_state() != TABLET_RUNNING) {
-                continue;
-            }
             int64_t last_sync_time = tablet->last_sync_time_s;
             if (last_sync_time <= last_sync_time_bound) {
                 sync_time_tablet_set.emplace(last_sync_time, weak_tablet);


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

Reply via email to