This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 58c9a18dd6e [Fix](brpc) Fix wrong usage of brpc call_id (#56825)
58c9a18dd6e is described below
commit 58c9a18dd6e3a8f1528c1638b1118e11bf168ee9
Author: zclllyybb <[email protected]>
AuthorDate: Sat Oct 25 17:02:23 2025 +0800
[Fix](brpc) Fix wrong usage of brpc call_id (#56825)
---
be/src/util/brpc_closure.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/util/brpc_closure.h b/be/src/util/brpc_closure.h
index c1be06c691d..e981b185fc0 100644
--- a/be/src/util/brpc_closure.h
+++ b/be/src/util/brpc_closure.h
@@ -36,6 +36,7 @@ public:
using ResponseType = Response;
DummyBrpcCallback() {
cntl_ = std::make_shared<brpc::Controller>();
+ call_id_ = cntl_->call_id();
response_ = std::make_shared<Response>();
}
@@ -43,8 +44,11 @@ public:
virtual void call() {}
- virtual void join() { brpc::Join(cntl_->call_id()); }
+ virtual void join() { brpc::Join(call_id_); }
+ // according to brpc doc, we MUST save the call_id before rpc done. use
this id to join.
+ // if a rpc is already done then we get the id and join, it's wrong.
+ brpc::CallId call_id_;
// controller has to be the same lifecycle with the closure, because brpc
may use
// it in any stage of the rpc.
std::shared_ptr<brpc::Controller> cntl_;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]