MXS-1507: Add transaction size limit

Added the `transaction_replay_max_size` parameter that controls the
maximum size of a transaction that can be replayed. If the limit is
exceeded, the stored statements are released thus preventing the
transaction from being replayed.

This limitation prevents accidental misuse of the transaction replaying
system when autocommit is disabled. It also allows the user to control the
amount of memory that MaxScale will use.
This commit is contained in:
Markus Mäkelä
2018-04-25 10:50:43 +03:00
parent cffed86962
commit 092532745d
6 changed files with 53 additions and 7 deletions

View File

@ -507,6 +507,7 @@ MXS_MODULE *MXS_CREATE_MODULE()
{"delayed_retry", MXS_MODULE_PARAM_BOOL, "false"},
{"delayed_retry_timeout", MXS_MODULE_PARAM_COUNT, "10"},
{"transaction_replay", MXS_MODULE_PARAM_BOOL, "false"},
{"transaction_replay_max_size", MXS_MODULE_PARAM_COUNT, "1Mi"},
{MXS_END_MODULE_PARAMS}
}
};