mirror of
https://github.com/sogou/workflow.git
synced 2026-10-29 11:36:47 +08:00
add in_select_history()
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user