From 8f6468f3eedf2ac8b7161d1e11d21a28145231ac Mon Sep 17 00:00:00 2001 From: YoungYang0820 Date: Mon, 6 Jun 2022 14:22:12 +0800 Subject: [PATCH] [CP] fix estimate local index size not working properly --- src/storage/ob_build_index_scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/ob_build_index_scheduler.cpp b/src/storage/ob_build_index_scheduler.cpp index 5951f7fe5f..bd7bc5c1a5 100644 --- a/src/storage/ob_build_index_scheduler.cpp +++ b/src/storage/ob_build_index_scheduler.cpp @@ -1424,7 +1424,7 @@ int ObBuildIndexScheduleTask::get_data_size(int64_t &data_size) ObFetchSstableSizeRes res; arg.pkey_ = pkey_; arg.index_id_ = index_id_; - if (OB_UNLIKELY(candidate_replica_.is_valid())) { + if (OB_UNLIKELY(!candidate_replica_.is_valid())) { ret = OB_ERR_UNEXPECTED; STORAGE_LOG(WARN, "candidate replica is invalid", K(ret), K(candidate_replica_)); } else if (OB_FAIL(GCTX.srv_rpc_proxy_->to(candidate_replica_).fetch_sstable_size(arg, res))) {