From 948ff9b5f1afcc50f5cf6653da5d2fef8469477e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 9 Apr 2018 19:17:36 +0300 Subject: [PATCH] MXS-1506: Skip error logging if retrying query If the query is about to be retried, error logging must be skipped. --- server/modules/routing/readwritesplit/rwsplit_route_stmt.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc index fd5162843..6d976e0bc 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc @@ -830,6 +830,7 @@ bool RWSplitSession::handle_master_is_target(SRWBackend* dest) } else { + succp = false; /** The original master is not available, we can't route the write */ if (m_config.master_failure_mode == RW_ERROR_ON_WRITE) { @@ -840,10 +841,9 @@ bool RWSplitSession::handle_master_is_target(SRWBackend* dest) m_current_master->close(); } } - else + else if (!can_retry_query()) { log_master_routing_failure(succp, m_current_master, target); - succp = false; } }