This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new e153103e4d3 branch-2.1: [improve](load) improve error message "close wait failed coz rpc error" #47518 (#47805) e153103e4d3 is described below commit e153103e4d39b532714b798c6cd8961eb361525a Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Tue Feb 18 09:38:28 2025 +0800 branch-2.1: [improve](load) improve error message "close wait failed coz rpc error" #47518 (#47805) Cherry-picked from #47518 Co-authored-by: Kaijie Chen <chenkai...@selectdb.com> --- be/src/vec/sink/writer/vtablet_writer.cpp | 3 ++- be/src/vec/sink/writer/vtablet_writer.h | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp b/be/src/vec/sink/writer/vtablet_writer.cpp index 6745c73d284..8cc5a3e7055 100644 --- a/be/src/vec/sink/writer/vtablet_writer.cpp +++ b/be/src/vec/sink/writer/vtablet_writer.cpp @@ -639,7 +639,8 @@ void VNodeChannel::try_send_pending_block(RuntimeState* state) { int remain_ms = _rpc_timeout_ms - _timeout_watch.elapsed_time() / NANOS_PER_MILLIS; if (UNLIKELY(remain_ms < config::min_load_rpc_timeout_ms)) { if (remain_ms <= 0 && !request->eos()) { - cancel(fmt::format("{}, err: timeout", channel_info())); + cancel(fmt::format("{}, err: load timeout after {} ms", channel_info(), + _rpc_timeout_ms)); _send_block_callback->clear_in_flight(); return; } else { diff --git a/be/src/vec/sink/writer/vtablet_writer.h b/be/src/vec/sink/writer/vtablet_writer.h index ba986fbc6d4..4d0a6c6827f 100644 --- a/be/src/vec/sink/writer/vtablet_writer.h +++ b/be/src/vec/sink/writer/vtablet_writer.h @@ -265,15 +265,11 @@ public: bool is_closed() const { return _is_closed; } bool is_cancelled() const { return _cancelled; } std::string get_cancel_msg() { - std::stringstream ss; - ss << "close wait failed coz rpc error"; - { - std::lock_guard<doris::SpinLock> l(_cancel_msg_lock); - if (!_cancel_msg.empty()) { - ss << ". " << _cancel_msg; - } + std::lock_guard<doris::SpinLock> l(_cancel_msg_lock); + if (!_cancel_msg.empty()) { + return _cancel_msg; } - return ss.str(); + return fmt::format("{} is cancelled", channel_info()); } // two ways to stop channel: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org