diff --git a/src/nameservice/WFServiceGovernance.cc b/src/nameservice/WFServiceGovernance.cc index a5015fd0..afd4ca31 100644 --- a/src/nameservice/WFServiceGovernance.cc +++ b/src/nameservice/WFServiceGovernance.cc @@ -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(); diff --git a/src/nameservice/WFServiceGovernance.h b/src/nameservice/WFServiceGovernance.h index a900f7a1..b2d0afe5 100644 --- a/src/nameservice/WFServiceGovernance.h +++ b/src/nameservice/WFServiceGovernance.h @@ -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()