From 97daf9cb06f7741dbd7d4a59e19d6cd45c7e3e55 Mon Sep 17 00:00:00 2001 From: ZenoWang Date: Tue, 18 Jul 2023 13:42:06 +0000 Subject: [PATCH] [FIX] tx data self freeze failed --- src/storage/tx_storage/ob_tenant_freezer.cpp | 26 +++++++++++++------ .../tx_table/ob_tx_data_memtable_mgr.cpp | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/storage/tx_storage/ob_tenant_freezer.cpp b/src/storage/tx_storage/ob_tenant_freezer.cpp index 7833080f72..bcb5c87a30 100755 --- a/src/storage/tx_storage/ob_tenant_freezer.cpp +++ b/src/storage/tx_storage/ob_tenant_freezer.cpp @@ -515,8 +515,9 @@ int ObTenantFreezer::get_tenant_tx_data_mem_used_(int64_t &tenant_tx_data_mem_us int ls_cnt = 0; int64_t ls_tx_data_mem_used = 0; for (; OB_SUCC(ret) && OB_SUCC(iter->get_next(ls)); ++ls_cnt) { - if (OB_FAIL(get_ls_tx_data_mem_used_(ls, ls_tx_data_mem_used))) { - LOG_WARN("[TenantFreezer] fail to get tx data mem used in one ls", KR(ret)); + int tmp_ret = OB_SUCCESS; + if (OB_TMP_FAIL(get_ls_tx_data_mem_used_(ls, ls_tx_data_mem_used))) { + LOG_WARN("[TenantFreezer] fail to get tx data mem used in one ls", KR(ret), K(ls->get_ls_id())); } else { tenant_tx_data_mem_used += ls_tx_data_mem_used; } @@ -651,12 +652,21 @@ int ObTenantFreezer::check_and_do_freeze() } else if (!tenant_info_.is_loaded_) { // do nothing } else if (FALSE_IT(tenant_info_.get_freeze_ctx(ctx))) { - } else if (OB_FAIL(check_and_freeze_normal_data_(ctx))) { - LOG_WARN("[TenantFreezer] check and freeze normal data failed.", KR(ret)); - } else if (OB_FAIL(check_and_freeze_tx_data_())) { - LOG_WARN("[TenantFreezer] check and freeze tx data failed.", KR(ret)); - } else if (OB_FAIL(check_and_freeze_mds_table_())) { - LOG_WARN("[TenantFreezer] check and freeze mds table failed.", KR(ret)); + } else { + int tmp_ret = OB_SUCCESS; + if (OB_TMP_FAIL(check_and_freeze_normal_data_(ctx))) { + LOG_WARN("[TenantFreezer] check and freeze normal data failed.", KR(tmp_ret)); + } + + tmp_ret = OB_SUCCESS; + if (OB_TMP_FAIL(check_and_freeze_tx_data_())) { + LOG_WARN("[TenantFreezer] check and freeze tx data failed.", KR(tmp_ret)); + } + + tmp_ret = OB_SUCCESS; + if (OB_TMP_FAIL(check_and_freeze_mds_table_())) { + LOG_WARN("[TenantFreezer] check and freeze mds table failed.", KR(tmp_ret)); + } } int64_t check_and_freeze_end_ts = ObTimeUtil::current_time(); diff --git a/src/storage/tx_table/ob_tx_data_memtable_mgr.cpp b/src/storage/tx_table/ob_tx_data_memtable_mgr.cpp index 65c5bdeb5d..82bec58a18 100755 --- a/src/storage/tx_table/ob_tx_data_memtable_mgr.cpp +++ b/src/storage/tx_table/ob_tx_data_memtable_mgr.cpp @@ -341,7 +341,7 @@ int ObTxDataMemtableMgr::get_active_memtable(ObTableHandleV2 &handle) const MemMgrRLockGuard lock_guard(lock_); if (0 == memtable_tail_) { ret = OB_EAGAIN; - STORAGE_LOG(INFO, "tx data memtable is not created yet. try agagin.", K(ret), K(memtable_tail_)); + STORAGE_LOG(INFO, "tx data memtable is not created yet. try agagin.", K(ret), K(ls_id_), K(memtable_tail_)); } else if (0 == get_memtable_count_()) { ret = OB_ENTRY_NOT_EXIST; STORAGE_LOG(WARN, "the tx data memtable manager is empty. may be offline", KR(ret), K(get_memtable_count_()));