From ae440a238ca4d150e4fa778b41e7ab6faac8de54 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 24 Apr 2026 16:28:05 +0800 Subject: [PATCH] fix: remove timeout for data sync op and range split op --- tx_service/include/tx_operation.h | 2 ++ tx_service/src/tx_operation.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tx_service/include/tx_operation.h b/tx_service/include/tx_operation.h index 3dfa983a9..66dee4973 100644 --- a/tx_service/include/tx_operation.h +++ b/tx_service/include/tx_operation.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -675,6 +676,7 @@ struct AsyncOp : public TransactionOperation void Reset(); std::function &async_op)> op_func_; + std::optional timeout_secs_{10}; // hd_result_ represents the async result, and op_func_ should finish it // after completes its work. diff --git a/tx_service/src/tx_operation.cpp b/tx_service/src/tx_operation.cpp index 013345179..337548b4c 100644 --- a/tx_service/src/tx_operation.cpp +++ b/tx_service/src/tx_operation.cpp @@ -3828,7 +3828,7 @@ void AsyncOp::Forward(TransactionExecution *txm) } txm->PostProcess(*this); } - else if (txm->IsTimeOut()) + else if (timeout_secs_.has_value() && txm->IsTimeOut(*timeout_secs_)) { TX_TRACE_ACTION_WITH_CONTEXT( this, @@ -3858,6 +3858,7 @@ template void AsyncOp::Reset() { hd_result_.Reset(); + timeout_secs_ = 10; if (worker_thread_.joinable()) { worker_thread_.join(); @@ -4588,6 +4589,7 @@ void SplitFlushRangeOp::Forward(TransactionExecution *txm) txn, &hd_res); }; + data_sync_op_.timeout_secs_ = std::nullopt; LOG(INFO) << "Split Flush transaction data sync, range id " << range_info_->PartitionId() @@ -7719,6 +7721,7 @@ void DataMigrationOp::Forward(TransactionExecution *txm) txm->CommitTs(), &async_op.hd_result_); }; + data_sync_op_.timeout_secs_ = std::nullopt; ACTION_FAULT_INJECTOR("data_migrate_after_install_dirty"); ForwardToSubOperation(txm, &data_sync_op_);