From 3b1b63d9394c91f0ce33fd7b417e8e19ee3500ef Mon Sep 17 00:00:00 2001 From: Niclas Antti Date: Thu, 4 Oct 2018 19:26:16 +0300 Subject: [PATCH] MXS-1777 Change LOWEST_RESPONSE_TIME to ADAPTIVE_ROUTING LOWEST_RESPONSE_TIME is not quite correct, and marketing material will call it Adaptive Routing, so better match that. --- server/modules/routing/readwritesplit/readwritesplit.hh | 8 ++++---- .../routing/readwritesplit/rwsplit_select_backends.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/modules/routing/readwritesplit/readwritesplit.hh b/server/modules/routing/readwritesplit/readwritesplit.hh index 46d95003c..42c74281b 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.hh +++ b/server/modules/routing/readwritesplit/readwritesplit.hh @@ -65,7 +65,7 @@ enum select_criteria_t LEAST_ROUTER_CONNECTIONS, /**< connections established by this router */ LEAST_BEHIND_MASTER, LEAST_CURRENT_OPERATIONS, - LOWEST_RESPONSE_TIME + ADAPTIVE_ROUTING }; /** @@ -94,7 +94,7 @@ static const MXS_ENUM_VALUE slave_selection_criteria_values[] = {"LEAST_ROUTER_CONNECTIONS", LEAST_ROUTER_CONNECTIONS}, {"LEAST_BEHIND_MASTER", LEAST_BEHIND_MASTER }, {"LEAST_CURRENT_OPERATIONS", LEAST_CURRENT_OPERATIONS}, - {"LOWEST_RESPONSE_TIME", LOWEST_RESPONSE_TIME }, + {"ADAPTIVE_ROUTING", ADAPTIVE_ROUTING }, {NULL} }; @@ -353,8 +353,8 @@ static inline const char* select_criteria_to_str(select_criteria_t type) case LEAST_CURRENT_OPERATIONS: return "LEAST_CURRENT_OPERATIONS"; - case LOWEST_RESPONSE_TIME: - return "LOWEST_RESPONSE_TIME"; + case ADAPTIVE_ROUTING: + return "ADAPTIVE_ROUTING"; default: return "UNDEFINED_CRITERIA"; diff --git a/server/modules/routing/readwritesplit/rwsplit_select_backends.cc b/server/modules/routing/readwritesplit/rwsplit_select_backends.cc index f0b8992bf..8987f5c0b 100644 --- a/server/modules/routing/readwritesplit/rwsplit_select_backends.cc +++ b/server/modules/routing/readwritesplit/rwsplit_select_backends.cc @@ -190,7 +190,7 @@ BackendSelectFunction get_backend_select_function(select_criteria_t sc) case LEAST_CURRENT_OPERATIONS: return backend_cmp_current_load; - case LOWEST_RESPONSE_TIME: + case ADAPTIVE_ROUTING: return backend_cmp_response_time; } @@ -297,7 +297,7 @@ static void log_server_connections(select_criteria_t criteria, const SRWBackendL STRSRVSTATUS(b->server)); break; - case LOWEST_RESPONSE_TIME: + case ADAPTIVE_ROUTING: { maxbase::Duration response_ave(server_response_time_average(b->server)); std::ostringstream os;