Silence routing failure warnings when retrying queries

If a routing failure happens while a query can still be retried, it should
not be logged.
This commit is contained in:
Markus Mäkelä
2018-06-23 00:36:48 +03:00
parent ee98ce1ee8
commit fa83901d03

View File

@ -893,8 +893,10 @@ bool RWSplitSession::handle_master_is_target(SRWBackend* dest)
m_current_master->close();
}
}
else if (!can_retry_query())
else if (!m_config.delayed_retry ||
m_retry_duration >= m_config.delayed_retry_timeout)
{
// Cannot retry the query, log a message that routing has failed
log_master_routing_failure(succp, m_current_master, target);
}
}