From 197d577aa11add94a9965bb22b24a819bf3ec3c6 Mon Sep 17 00:00:00 2001 From: Esa Korhonen Date: Wed, 19 Jun 2019 12:24:01 +0300 Subject: [PATCH] Set correct replication lag state The lag state was inverted. --- .../modules/routing/readwritesplit/rwsplit_select_backends.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_select_backends.cc b/server/modules/routing/readwritesplit/rwsplit_select_backends.cc index 80152cf56..8dd04e8e2 100644 --- a/server/modules/routing/readwritesplit/rwsplit_select_backends.cc +++ b/server/modules/routing/readwritesplit/rwsplit_select_backends.cc @@ -316,7 +316,7 @@ RWBackend* RWSplitSession::get_slave_backend(int max_rlag) if (max_rlag != SERVER::RLAG_UNDEFINED) { - auto state = rlag_ok ? SERVER::RLagState::ABOVE_LIMIT : SERVER::RLagState::BELOW_LIMIT; + auto state = rlag_ok ? SERVER::RLagState::BELOW_LIMIT : SERVER::RLagState::ABOVE_LIMIT; backend->change_rlag_state(state, max_rlag); } }