From 24ef025b73e49b0624ccd01df524f1bf6bf3f815 Mon Sep 17 00:00:00 2001 From: chinaxing Date: Fri, 20 Dec 2024 07:15:20 +0000 Subject: [PATCH] fix is_tx_commit_timeout and is_tx_timeout --- src/storage/tx/ob_trans_define_v4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/tx/ob_trans_define_v4.h b/src/storage/tx/ob_trans_define_v4.h index 58b651e80..e1325b436 100644 --- a/src/storage/tx/ob_trans_define_v4.h +++ b/src/storage/tx/ob_trans_define_v4.h @@ -846,8 +846,8 @@ public: && state_ <= State::SUB_ROLLBACKED; } bool is_aborted() const { return state_ == State::ABORTED; } - bool is_tx_timeout() { return ObClockGenerator::getClock() > expire_ts_; } - bool is_tx_commit_timeout() { return ObClockGenerator::getClock() > commit_expire_ts_;} + bool is_tx_timeout() { return expire_ts_ > 0 && ObClockGenerator::getClock() > expire_ts_; } + bool is_tx_commit_timeout() { return commit_expire_ts_ > 0 && ObClockGenerator::getClock() > commit_expire_ts_;} void set_xa_ctx(ObXACtx *xa_ctx); ObXACtx *get_xa_ctx() { return xa_ctx_; } void set_xid(const ObXATransID &xid) { xid_ = xid; }