diff --git a/src/storage/lob/ob_lob_manager.cpp b/src/storage/lob/ob_lob_manager.cpp index 037f36ace1..f7051f0c93 100644 --- a/src/storage/lob/ob_lob_manager.cpp +++ b/src/storage/lob/ob_lob_manager.cpp @@ -3358,10 +3358,14 @@ int ObLobQueryIter::open(ObLobAccessParam ¶m, common::ObAddr dst_addr) query_arg_.lob_locator_.ptr_ = param.lob_locator_->ptr_; query_arg_.lob_locator_.size_ = param.lob_locator_->size_; query_arg_.lob_locator_.has_lob_header_ = param.lob_locator_->has_lob_header_; + int64_t timeout = param.timeout_ - ObTimeUtility::current_time(); + if (timeout < ObStorageRpcProxy::STREAM_RPC_TIMEOUT) { + timeout = ObStorageRpcProxy::STREAM_RPC_TIMEOUT; + } ret = svr_rpc_proxy->to(dst_addr).by(query_arg_.tenant_id_) .dst_cluster_id(cluster_id) .ratelimit(true).bg_flow(obrpc::ObRpcProxy::BACKGROUND_FLOW) - .timeout(ObStorageRpcProxy::STREAM_RPC_TIMEOUT) + .timeout(timeout) .lob_query(query_arg_, rpc_buffer_, handle_); if (OB_FAIL(ret)) { LOG_WARN("failed to do remote query", K(ret), K(query_arg_));