-
Notifications
You must be signed in to change notification settings - Fork 558
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
optimize(http1): retry if the error is caused by broken pooled conn #871
Conversation
3c4ad1e
to
fe96af9
Compare
9375cca
to
1d5f5ca
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #871 +/- ##
===========================================
+ Coverage 79.74% 79.96% +0.22%
===========================================
Files 97 97
Lines 9534 9580 +46
===========================================
+ Hits 7603 7661 +58
+ Misses 1432 1420 -12
Partials 499 499
☔ View full report in Codecov by Sentry. |
0353b2a
to
746e1ca
Compare
What type of PR is this?
optimize
Check the PR title.
<type>(optional scope): <description>
.(Optional) Translate the PR title into Chinese.
HTTP/1.1 client 增加对于连接池中连接被提前关闭导致的错误请求的重试
(Optional) More detail description for this PR(en: English/zh: Chinese).
en:
Since hertz does not retry by default, once the connection in the connection pool is closed by the peer in advance, the client's request will directly fail this time, which is unreasonable.
This optimization adds a default retry logic for such scenarios to ensure that no more requests will fail due to problems with the connection pool itself.
zh(optional):
由于hertz默认是不重试的,一旦连接池中的连接被对方提前关闭,那么客户端这次的请求将直接失败,这是不合理的。
此次优化针对此类场景添加了默认的重试逻辑,保证不会再有请求因为连接池本身的问题而失败。
(Optional) Which issue(s) this PR fixes:
(Optional) The PR that updates user documentation: