This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 6d6179a5eab [fix](thirdparty) patch brpc 1.4.0 to fix stream rpc
(#30476)
6d6179a5eab is described below
commit 6d6179a5eab02a13b9001af1d58182261c0c3a79
Author: Kaijie Chen <[email protected]>
AuthorDate: Mon Jan 29 09:43:22 2024 +0800
[fix](thirdparty) patch brpc 1.4.0 to fix stream rpc (#30476)
---
.../brpc-1.4.0-fix-stream-rpc-set-connected.patch | 41 ++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/thirdparty/patches/brpc-1.4.0-fix-stream-rpc-set-connected.patch
b/thirdparty/patches/brpc-1.4.0-fix-stream-rpc-set-connected.patch
new file mode 100644
index 00000000000..8e122a57b8f
--- /dev/null
+++ b/thirdparty/patches/brpc-1.4.0-fix-stream-rpc-set-connected.patch
@@ -0,0 +1,41 @@
+From 9acc6ef89d8770d5516953e2eadf0c27a7d424fc Mon Sep 17 00:00:00 2001
+From: Kaijie Chen <[email protected]>
+Date: Sun, 28 Jan 2024 15:58:31 +0800
+Subject: [PATCH] fix set connected for stream rpc
+
+---
+ src/brpc/policy/baidu_rpc_protocol.cpp | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/src/brpc/policy/baidu_rpc_protocol.cpp
b/src/brpc/policy/baidu_rpc_protocol.cpp
+index 0239960e..c47903a6 100644
+--- a/src/brpc/policy/baidu_rpc_protocol.cpp
++++ b/src/brpc/policy/baidu_rpc_protocol.cpp
+@@ -234,6 +234,11 @@ void SendRpcResponse(int64_t correlation_id,
+ // Send rpc response over stream even if server side failed to create
+ // stream for some reasons.
+ if(cntl->has_remote_stream()){
++ if(stream_ptr) {
++ // Now it's ok the mark this server-side stream as connectted as
all the
++ // written user data would follower the RPC response.
++ ((Stream*)stream_ptr->conn())->SetConnected();
++ }
+ // Send the response over stream to notify that this stream connection
+ // is successfully built.
+ // Response_stream can be INVALID_STREAM_ID when error occurs.
+@@ -249,12 +254,6 @@ void SendRpcResponse(int64_t correlation_id,
+ }
+ return;
+ }
+-
+- if(stream_ptr) {
+- // Now it's ok the mark this server-side stream as connectted as
all the
+- // written user data would follower the RPC response.
+- ((Stream*)stream_ptr->conn())->SetConnected();
+- }
+ } else{
+ // Have the risk of unlimited pending responses, in which case, tell
+ // users to set max_concurrency.
+--
+2.39.3
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]