MXS-1507: Make transaction replay configurable

The transaction retrying behavior is now configurable and documented. The
`transaction_replay` parameter implicitly enables the required
functionality in the router that it needs.
This commit is contained in:
Markus Mäkelä
2018-04-20 08:59:58 +03:00
parent c1c942a058
commit 2848f96945
4 changed files with 60 additions and 9 deletions

View File

@ -290,6 +290,16 @@ RWSplit* RWSplit::create(SERVICE *service, char **options)
config.max_sescmd_history = 0;
}
if (config.transaction_replay)
{
/**
* Replaying transactions requires that we are able to do delayed query
* retries and reconnect to a master.
*/
config.delayed_retry = true;
config.master_reconnection = true;
}
return new (std::nothrow) RWSplit(service, config);
}
@ -496,6 +506,7 @@ MXS_MODULE *MXS_CREATE_MODULE()
{"master_reconnection", MXS_MODULE_PARAM_BOOL, "false"},
{"delayed_retry", MXS_MODULE_PARAM_BOOL, "false"},
{"delayed_retry_timeout", MXS_MODULE_PARAM_COUNT, "10"},
{"transaction_replay", MXS_MODULE_PARAM_BOOL, "false"},
{MXS_END_MODULE_PARAMS}
}
};