[fix](brpc) disable SSL BIO buffer #64962
Open
luwei16 wants to merge 1 commit into
Open
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
### What problem does this PR solve? Issue Number: N/A Related PR: N/A Problem Summary: Doris uses brpc 1.4.0 in thirdparty. When mTLS is enabled, brpc adds an extra buffered BIO layer after SSL handshake. Large meta-service get_rowset responses can expose a TLS write issue in this path: SSL_write() may consume plaintext successfully, but the later BIO_flush() can hit non-fatal EAGAIN while encrypted bytes are still buffered. brpc 1.4.0 does not surface that flush EAGAIN as SSL_ERROR_WANT_WRITE to the outer KeepWrite/EPOLLOUT retry path. The server side may therefore treat the write as completed while BE receives an incomplete brpc response frame and eventually times out. This is hard to reproduce locally because it depends on socket backpressure during the buffered BIO flush, not just response size. Production Service/VIP/CNI/node load/conntrack/send queues can make this timing window easier to hit. Backport the upstream brpc approach by disabling AddBIOBuffer(...) after SSL handshake. Without this buffered BIO layer, SSL_write() can surface SSL_ERROR_WANT_WRITE directly to brpc's existing KeepWrite/EPOLLOUT retry mechanism. Increasing timeout is not a real fix because the server side may already have misjudged the write as complete. ### Release note Fix possible meta-service get_rowset timeout with mTLS when brpc TLS buffered BIO fails to flush all encrypted bytes under socket backpressure. ### Check List (For Author) - Test: No need to test. Thirdparty brpc patch only; the failure depends on production socket backpressure timing. - Behavior changed: Yes. TLS connections no longer use brpc's extra SSL buffered BIO layer so WANT_WRITE is handled by the existing retry mechanism. - Does this need documentation: No
86bf13a to
fbc0ea3
Compare
Contributor
Author
|
run buildall |
gavinchou
approved these changes
Jun 29, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
Author
|
run beut |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.