From 95be350cd2ff1ce61cf6ec08b936bb557aedbe8a Mon Sep 17 00:00:00 2001 From: hamstersox <673144759@qq.com> Date: Tue, 4 Jul 2023 02:12:28 +0000 Subject: [PATCH] adjust FETCH_LS_VIEW_INFO_TIMEOUT to 1min --- src/storage/high_availability/ob_storage_ha_reader.h | 2 +- src/storage/ob_storage_rpc.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/storage/high_availability/ob_storage_ha_reader.h b/src/storage/high_availability/ob_storage_ha_reader.h index 7214ef738..82c563e3f 100644 --- a/src/storage/high_availability/ob_storage_ha_reader.h +++ b/src/storage/high_availability/ob_storage_ha_reader.h @@ -679,7 +679,7 @@ public: obrpc::ObCopyTabletInfo &tablet_info) override; private: - static const int64_t FETCH_LS_VIEW_INFO_TIMEOUT = 10 * 60 * 1000 * 1000; // 10min // TODO(chongrong.th) change timeout to 1min later, + static const int64_t FETCH_LS_VIEW_INFO_TIMEOUT = 60 * 1000 * 1000; // 1min bool is_inited_; ObLSMetaPackage ls_meta_; ObStorageStreamRpcReader rpc_reader_; diff --git a/src/storage/ob_storage_rpc.cpp b/src/storage/ob_storage_rpc.cpp index 280d67004..924c0f9d0 100644 --- a/src/storage/ob_storage_rpc.cpp +++ b/src/storage/ob_storage_rpc.cpp @@ -1466,7 +1466,9 @@ int ObFetchTabletInfoP::process() LOG_INFO("start to fetch tablet info", K(arg_)); last_send_time_ = ObTimeUtility::current_time(); - + const int64_t cost_time = 10 * 1000 * 1000; + common::ObTimeGuard timeguard("ObFetchTabletInfoP", cost_time); + timeguard.click(); if (NULL == (buf = reinterpret_cast(allocator_.alloc(OB_MALLOC_BIG_BLOCK_SIZE)))) { ret = OB_ALLOCATE_MEMORY_FAILED; STORAGE_LOG(WARN, "failed to alloc migrate data buffer.", K(ret)); @@ -1511,6 +1513,7 @@ int ObFetchTabletInfoP::process() STORAGE_LOG(WARN, "failed to get next tablet meta info", K(ret)); } } else if (tablet_count >= MAX_TABLET_NUM) { + timeguard.click(); if (this->result_.get_position() > 0 && OB_FAIL(flush_and_wait())) { LOG_WARN("failed to flush and wait", K(ret), K(tablet_info)); } else { @@ -1525,6 +1528,7 @@ int ObFetchTabletInfoP::process() tablet_count++; } } + timeguard.click(); if (OB_SUCC(ret)) { if (arg_.need_check_seq_) { if (OB_FAIL(compare_ls_rebuild_seq(arg_.tenant_id_, arg_.ls_id_, arg_.ls_rebuild_seq_))) {