apache / apache/brpc

是否可以直接执行Socket::StartWrite里的KeepWrite?

Open
#2,588 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

![image](https://github.com/apache/brpc/assets/132085767/180f26ca-86f2-4428-887e-692999cb0f69)
Socket::StartWrite里的KeepWrite,是不是可以直接调用,不需要起后台bthread。当前session的response已经返回了,直接用当前bthread执行排队的response就可以,不然在压力比较大的时候等其他worker去执行这个bthead,延迟会增加很多

Contributor guide

Open the contributing guide

Research direction

Start by reading Socket::StartWrite and KeepWrite, the only entry points named in the issue, and trace how the current bthread is created and how queued responses are executed. Determine whether running KeepWrite in the current bthread is safe and measure the high-load latency impact; done requires a decided design and validation of the proposed scheduling change.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.