This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 2af4e9190a3 branch-4.1: [fix](brpc) disable SSL BIO buffer #64962
(#65189)
2af4e9190a3 is described below
commit 2af4e9190a309166305fc346e7285a7afd0619f9
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 3 20:35:40 2026 +0800
branch-4.1: [fix](brpc) disable SSL BIO buffer #64962 (#65189)
Cherry-picked from #64962
Co-authored-by: Luwei <[email protected]>
---
.../patches/brpc-1.4.0-disable-ssl-bio-buffer.patch | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/thirdparty/patches/brpc-1.4.0-disable-ssl-bio-buffer.patch
b/thirdparty/patches/brpc-1.4.0-disable-ssl-bio-buffer.patch
new file mode 100644
index 00000000000..b8a3976853b
--- /dev/null
+++ b/thirdparty/patches/brpc-1.4.0-disable-ssl-bio-buffer.patch
@@ -0,0 +1,19 @@
+diff --git a/src/brpc/socket.cpp b/src/brpc/socket.cpp
+index e3878c19..d0dd4f4d 100644
+--- a/src/brpc/socket.cpp
++++ b/src/brpc/socket.cpp
+@@ -1889,7 +1889,13 @@ int Socket::SSLHandshake(int fd, bool server_mode) {
+ int rc = SSL_do_handshake(_ssl_session);
+ if (rc == 1) {
+ _ssl_state = SSL_CONNECTED;
+- AddBIOBuffer(_ssl_session, fd, FLAGS_ssl_bio_buffer_size);
++ // Do not add BIO_f_buffer on SSL connections.
++ //
++ // brpc-1.4.0 flushes this buffered BIO after SSL_write(), but a
++ // non-fatal EAGAIN from BIO_flush() is not propagated as
++ // SSL_ERROR_WANT_WRITE. Large TLS responses may then be
considered
++ // written while encrypted bytes are still buffered and never
retried.
++ // Let OpenSSL's socket BIO surface WANT_WRITE to KeepWrite
instead.
+ return 0;
+ }
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]