From 77a4d47202e9b61888f47c9bf2e7a9c9e2b0bfb0 Mon Sep 17 00:00:00 2001 From: obdev Date: Wed, 14 Jul 2021 23:48:13 +0800 Subject: [PATCH] fix getting invalid timestamp when generate_weak_read_timestamp --- src/storage/ob_partition_loop_worker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/storage/ob_partition_loop_worker.cpp b/src/storage/ob_partition_loop_worker.cpp index 68ad29d01..c0697ceac 100644 --- a/src/storage/ob_partition_loop_worker.cpp +++ b/src/storage/ob_partition_loop_worker.cpp @@ -123,6 +123,10 @@ int ObPartitionLoopWorker::gen_readable_info_with_memtable_(ObPartitionReadableI if (OB_ISNULL(pls_) || OB_ISNULL(txs_) || OB_ISNULL(replay_status_)) { ret = OB_ERR_UNEXPECTED; STORAGE_LOG(WARN, "not inited", K(ret), K(pkey_), KP_(pls), KP_(txs), KP_(replay_status)); + } else if (!replay_status_->is_enabled()) { + //current replay_status is disable, return specific errcode + ret = OB_STATE_NOT_MATCH; + STORAGE_LOG(WARN, "replay status is disable", K(ret), K(pkey_), KP_(pls), KP_(txs), KP_(replay_status)); } else if (OB_FAIL(pls_->get_next_replay_log_info(next_replay_log_id, readable_info.min_log_service_ts_))) { if (OB_STATE_NOT_MATCH == ret) { // print one log per minute