From c3a5e9ca807e7a72cf8a7f0318fcbd9375925e16 Mon Sep 17 00:00:00 2001 From: Siyang Tang Date: Mon, 23 Dec 2024 19:33:43 +0800 Subject: [PATCH] [enhancement](meta) Sync meta even if local state is not running --- 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 31b7c6dd5dc8cd..fd8c368b54fac5 100644 --- a/be/src/cloud/cloud_tablet.cpp +++ b/be/src/cloud/cloud_tablet.cpp @@ -870,9 +870,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 e7a7d254f3fa89..f60d0eeb5ba0dd 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);