You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/10/24 08:21:01 UTC
(doris) branch branch-2.0 updated: [enhancement](errormsg) print backend ip when brpc light pool is full (#42370)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new bf0a1fbc912 [enhancement](errormsg) print backend ip when brpc light pool is full (#42370)
bf0a1fbc912 is described below
commit bf0a1fbc91266950a23e9274c72baa7b04e1816c
Author: yiguolei <67...@qq.com>
AuthorDate: Thu Oct 24 16:20:53 2024 +0800
[enhancement](errormsg) print backend ip when brpc light pool is full (#42370)
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
Co-authored-by: yiguolei <yi...@gmail.com>
---
be/src/service/internal_service.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/be/src/service/internal_service.cpp b/be/src/service/internal_service.cpp
index 9591c1928ee..0c36999e6f1 100644
--- a/be/src/service/internal_service.cpp
+++ b/be/src/service/internal_service.cpp
@@ -178,9 +178,13 @@ concept CanCancel = requires(T* response) { response->mutable_status(); };
template <CanCancel T>
void offer_failed(T* response, google::protobuf::Closure* done, const FifoThreadPool& pool) {
brpc::ClosureGuard closure_guard(done);
- response->mutable_status()->set_status_code(TStatusCode::CANCELLED);
- response->mutable_status()->add_error_msgs("fail to offer request to the work pool, pool=" +
- pool.get_info());
+ // Should use status to generate protobuf message, because it will encoding Backend Info
+ // into the error message and then we could know which backend's pool is full.
+ Status st = Status::Error<TStatusCode::CANCELLED>(
+ "fail to offer request to the work pool, pool={}", pool.get_info());
+ st.to_protobuf(response->mutable_status());
+ LOG(WARNING) << "cancelled due to fail to offer request to the work pool, pool="
+ << pool.get_info();
}
template <typename T>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org