Expand readwritesplit delayed retry error message

The error now explains if the write failure was due to the
delayed_retry_timeout being reached.
This commit is contained in:
Markus Mäkelä 2018-11-05 09:31:41 +02:00
parent 4341c2b6e2
commit 113b1503f6
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -842,7 +842,11 @@ void RWSplitSession::log_master_routing_failure(bool found,
|| curr_master->dcb()->dcb_role == DCB_ROLE_BACKEND_HANDLER);
char errmsg[MAX_SERVER_ADDRESS_LEN * 2 + 100]; // Extra space for error message
if (!found)
if (m_config.delayed_retry && m_retry_duration >= m_config.delayed_retry_timeout)
{
sprintf(errmsg, "'delayed_retry_timeout' exceeded before a master could be found");
}
else if (!found)
{
sprintf(errmsg, "Could not find a valid master connection");
}