From dadec7a18aabfbb0ea024fcf4c56ea2615024e05 Mon Sep 17 00:00:00 2001 From: wxhwang Date: Thu, 8 Feb 2024 03:24:04 +0000 Subject: [PATCH] [CP] only NORMAL tablet can backup data --- src/storage/backup/ob_backup_utils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/storage/backup/ob_backup_utils.cpp b/src/storage/backup/ob_backup_utils.cpp index ebc31486a3..43cb5fa1e6 100644 --- a/src/storage/backup/ob_backup_utils.cpp +++ b/src/storage/backup/ob_backup_utils.cpp @@ -1902,6 +1902,7 @@ int ObBackupTabletProvider::get_tablet_handle_(const uint64_t tenant_id, const s } else { // sync wait transfer in tablet replace table finish const int64_t ABS_TIMEOUT_TS = ObTimeUtil::current_time() + 5 * 60 * 1000 * 1000; //5min + bool is_normal_tablet = false; while (OB_SUCC(ret)) { tablet_handle.reset(); if (ABS_TIMEOUT_TS < ObTimeUtil::current_time()) { @@ -1919,6 +1920,11 @@ int ObBackupTabletProvider::get_tablet_handle_(const uint64_t tenant_id, const s } else if (tablet_handle.get_obj()->get_tablet_meta().has_transfer_table()) { LOG_INFO("transfer table is not replaced", K(ret), K(tenant_id), K(ls_id), K(tablet_id)); usleep(100 * 1000); // wait 100ms + } else if (OB_FAIL(check_tablet_status_(tablet_handle, is_normal_tablet))) { + LOG_WARN("failed to check tablet is normal", K(ret), K(tenant_id), K(ls_id), K(rebuild_seq)); + } else if (!is_normal_tablet) { + LOG_INFO("tablet status is not normal", K(tenant_id), K(ls_id), K(tablet_id)); + usleep(100 * 1000); // wait 100ms } else { break; }