This is an automated email from the ASF dual-hosted git repository. liaoxin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 2a5530d40ae [improve](load) improve error message "close wait failed coz rpc error" (#47518) 2a5530d40ae is described below commit 2a5530d40ae3a02932ac44b00d0b1997dcd65981 Author: Kaijie Chen <chenkai...@selectdb.com> AuthorDate: Wed Feb 12 11:38:12 2025 +0800 [improve](load) improve error message "close wait failed coz rpc error" (#47518) Improve error message `"close wait failed coz rpc error"`. Return detailed cancel message directly if there is one. If there is no cancel message, return `"VNodeChannel ... is cancelled"`. --- 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 0de868c00b9..bc383e6a560 100644 --- a/be/src/vec/sink/writer/vtablet_writer.cpp +++ b/be/src/vec/sink/writer/vtablet_writer.cpp @@ -673,7 +673,8 @@ void VNodeChannel::try_send_pending_block(RuntimeState* state) { auto 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 62528a57114..94d80772c8a 100644 --- a/be/src/vec/sink/writer/vtablet_writer.h +++ b/be/src/vec/sink/writer/vtablet_writer.h @@ -264,15 +264,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