-
Notifications
You must be signed in to change notification settings - Fork 4k
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
method level option to ignore server eovercrowded #2820
base: master
Are you sure you want to change the base?
Conversation
@@ -586,6 +586,11 @@ void ProcessRpcRequest(InputMessageBase* msg_base) { | |||
mp->service->CallMethod(mp->method, cntl.get(), &breq, &bres, NULL); | |||
break; | |||
} | |||
if (socket->is_overcrowded() && !server->options().ignore_eovercrowded && !mp->ignore_eovercrowded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
太长了,可以换一下行
@@ -1495,7 +1495,7 @@ void ProcessHttpRequest(InputMessageBase *msg) { | |||
// NOTE: accesses to builtin services are not counted as part of | |||
// concurrency, therefore are not limited by ServerOptions.max_concurrency. | |||
if (!sp->is_builtin_service && !sp->params.is_tabbed) { | |||
if (socket->is_overcrowded() && !server->options().ignore_eovercrowded) { | |||
if (socket->is_overcrowded() && !server->options().ignore_eovercrowded && !sp->ignore_eovercrowded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
@@ -454,6 +448,12 @@ void ProcessHuluRequest(InputMessageBase* msg_base) { | |||
sp->service->CallMethod(sp->method, cntl.get(), &breq, &bres, NULL); | |||
break; | |||
} | |||
if (socket->is_overcrowded() && !server->options().ignore_eovercrowded && !sp->ignore_eovercrowded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
@@ -406,6 +400,11 @@ void ProcessSofaRequest(InputMessageBase* msg_base) { | |||
meta.method().c_str()); | |||
break; | |||
} | |||
if (socket->is_overcrowded() && !server->options().ignore_eovercrowded && !sp->ignore_eovercrowded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
What problem does this PR solve?
Issue Number:
Problem Summary:
What is changed and the side effects?
Changed: add a method-level option(only valid for baidu_rpc, http_rpc, hulu_pbrpc and sofa_pbrpc protocols) to enable ignore eovercrowded errors for some methods.
Side effects:
Performance effects(性能影响): no or little
Breaking backward compatibility(向后兼容性):
Check List: