add in_select_history()

This commit is contained in:
holmes1412
2021-03-24 17:54:42 +08:00
parent 16d09febb4
commit abd529b712
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -321,13 +321,13 @@ bool WFServiceGovernance::select(const ParsedURI& uri, WFNSTracing *tracing,
}
// select_addr == NULL will only happened in consistent_hash
const EndpointAddress *select_addr = this->first_strategy(uri);
const EndpointAddress *select_addr = this->first_strategy(uri, tracing);
if (!select_addr ||
select_addr->fail_count >= select_addr->params->max_fails)
{
if (this->try_another)
select_addr = this->another_strategy(uri);
select_addr = this->another_strategy(uri, tracing);
}
this->rwlock.unlock();
+1
View File
@@ -127,6 +127,7 @@ public:
virtual void server_list_change(const EndpointAddress *address, int state)
{}
void set_mttr_second(unsigned int second) { this->mttr_second = second; }
static bool in_select_history(WFNSTracing *tracing, EndpointAddress *addr);
public:
WFServiceGovernance()