Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for StreamWrite and Async RPC to write to socket in background bthread. #2280

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

MrGuin
Copy link
Contributor

@MrGuin MrGuin commented Jun 15, 2023

Add write_in_background option to Socket::StartWrite.
StreamWrite and async RPC call could pass write_in_background option to create background bthread to write to socket so that current thread won't block for 10-20us writing to socket.

src/brpc/socket.h Outdated Show resolved Hide resolved
src/brpc/controller.cpp Outdated Show resolved Hide resolved
src/brpc/stream.cpp Outdated Show resolved Hide resolved
@chenBright chenBright linked an issue Jun 17, 2023 that may be closed by this pull request
@wwbmmm
Copy link
Contributor

wwbmmm commented Jun 25, 2023

CI失败的问题master分支已修复,请更新一下

Copy link
Contributor

@chenBright chenBright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MrGuin MrGuin changed the title StreamWrite and Async RPC write to socket in background bthread. Add option for StreamWrite and Async RPC to write to socket in background bthread. Jul 4, 2023
@wwbmmm wwbmmm merged commit 7d1df9f into apache:master Aug 16, 2023
MrGuin added a commit to monographdb/brpc that referenced this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streaming RPC 的 StreamWrite 存在性能问题
4 participants