mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Optimize speed when using upstreams. (#1768)
This commit is contained in:
@@ -259,9 +259,13 @@ void WFServiceGovernance::success(RouteManager::RouteResult *result,
|
||||
auto *v = &tracing_data->history;
|
||||
EndpointAddress *server = (*v)[v->size() - 1];
|
||||
|
||||
pthread_rwlock_wrlock(&this->rwlock);
|
||||
this->recover_server_from_breaker(server);
|
||||
pthread_rwlock_unlock(&this->rwlock);
|
||||
server->fail_count = 0;
|
||||
if (server->entry.list.next)
|
||||
{
|
||||
pthread_rwlock_wrlock(&this->rwlock);
|
||||
this->recover_server_from_breaker(server);
|
||||
pthread_rwlock_unlock(&this->rwlock);
|
||||
}
|
||||
|
||||
this->WFNSPolicy::success(result, tracing, target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user