MXS-2834: Make retrying of trx deadlocks configurable

The behavior is not desirable in all cases and should be enabled only if
needed.
This commit is contained in:
Markus Mäkelä
2020-01-11 11:53:01 +02:00
parent 09c55111cc
commit 6c14ac7829
4 changed files with 18 additions and 1 deletions

View File

@ -709,7 +709,8 @@ void RWSplitSession::clientReply(GWBUF* writebuf, DCB* backend_dcb)
}
}
if ((error.is_rollback() || error.is_wsrep_error()) && handle_ignorable_error(backend))
if (((m_config.trx_retry_on_deadlock && error.is_rollback()) || error.is_wsrep_error())
&& handle_ignorable_error(backend))
{
// We can ignore this error and treat it as if the connection to the server was broken.
gwbuf_free(writebuf);