From bad2aaf5e01352f8dd6632f5f253dd960fc1fb6c Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 24 Nov 2022 10:05:41 +0000 Subject: [PATCH] check trans_expired_time_ validity in handle_timeout --- src/storage/tx/ob_trans_part_ctx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storage/tx/ob_trans_part_ctx.cpp b/src/storage/tx/ob_trans_part_ctx.cpp index ba6547ecf..b5464164c 100644 --- a/src/storage/tx/ob_trans_part_ctx.cpp +++ b/src/storage/tx/ob_trans_part_ctx.cpp @@ -434,7 +434,9 @@ int ObPartTransCtx::handle_timeout(const int64_t delay) (void)unregister_timeout_task_(); update_trans_2pc_timeout_(); timeout_task_.set_running(true); - if (ObTxState::INIT == exec_info_.state_ && now >= (trans_expired_time_ + OB_TRANS_WARN_USE_TIME)) { + if (ObTxState::INIT == exec_info_.state_ && + trans_expired_time_ > 0 && trans_expired_time_ < INT64_MAX && + now >= (trans_expired_time_ + OB_TRANS_WARN_USE_TIME)) { TRANS_LOG(ERROR, "transaction use too much time", KPC(this)); } if (exec_info_.is_dup_tx_) {