superhail commented on code in PR #2820: URL: https://github.com/apache/brpc/pull/2820#discussion_r1853222453
########## src/brpc/server.cpp: ########## @@ -2302,6 +2310,74 @@ int Server::MaxConcurrencyOf(google::protobuf::Service* service, return MaxConcurrencyOf(service->GetDescriptor()->full_name(), method_name); } +bool& Server::IgnoreEovercrowdedOf(MethodProperty* mp) { + if (IsRunning()) { + LOG(WARNING) << "IgnoreEovercrowdedOf is only allowd before Server started"; + return g_default_ignore_eovercrowded; + } + if (mp->status == NULL) { + LOG(ERROR) << "method=" << mp->method->full_name() + << " does not support ignore_eovercrowded"; + _failed_to_set_ignore_eovercrowded = true; + return g_default_ignore_eovercrowded; + } + return mp->ignore_eovercrowded; +} + +bool Server::IgnoreEovercrowdedOf(const MethodProperty* mp) const { + if (IsRunning()) { + LOG(WARNING) << "IgnoreEovercrowdedOf is only allowd before Server started"; + return g_default_ignore_eovercrowded; + } + if (mp == NULL || mp->status == NULL) { + return false; Review Comment: 噢 忽然发现应该不需要设置,这个不是set方法,这个应该是一个get方法 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org