Changed the way max_sescmd_history works and combined disable_sescmd_history and disable_slave_recovery.
Before these changes when max_sescmd_history was used the session was closed when the limit was exceeded. With this change, when the limit is exceeded the recovery of slaves and the session command history are both disabled. This will allow the sessions to continue while still keeping the old functionality of limited salve replacement. The disable_sescmd_history and disable_slave_recovery parameters were combined so that disabling the session command history will also disable slave recovery. This way no harm can be done with disable_sescmd_history.
This commit is contained in:
@ -73,9 +73,12 @@ When value all is used, queries reading session variables can be routed to any a
|
|||||||
|
|
||||||
In above-mentioned case the user-defined variable would only be updated in the master where query would be routed due to `INSERT` statement.
|
In above-mentioned case the user-defined variable would only be updated in the master where query would be routed due to `INSERT` statement.
|
||||||
|
|
||||||
**`max_sescmd_history`** sets a limit on how many session commands each session can execute before the connection is closed. The default is an unlimited number of session commands.
|
**`max_sescmd_history`** sets a limit on how many session commands each session can execute before the session command history is disabled. The default is an unlimited number of session commands.
|
||||||
|
|
||||||
max_sescmd_history=1500
|
```
|
||||||
|
# Set a limit on the session command history
|
||||||
|
max_sescmd_history=1500
|
||||||
|
```
|
||||||
|
|
||||||
When a limitation is set, it effectively creates a cap on the session's memory consumption. This might be useful if connection pooling is used and the sessions use large amounts of session commands.
|
When a limitation is set, it effectively creates a cap on the session's memory consumption. This might be useful if connection pooling is used and the sessions use large amounts of session commands.
|
||||||
|
|
||||||
@ -86,13 +89,6 @@ When a limitation is set, it effectively creates a cap on the session's memory c
|
|||||||
disable_sescmd_history=true
|
disable_sescmd_history=true
|
||||||
```
|
```
|
||||||
|
|
||||||
**`disable_slave_recovery`** disables the recovery and replacement of slave servers. If this option is enabled and a connection to a slave server in use is lost, no replacement slave will be taken. This allows the safe use of session state modifying statements when the session command history is disabled. This is mostly intended to be used with the `disable_sescmd_history` option enabled.
|
|
||||||
|
|
||||||
```
|
|
||||||
# Disable the session command history
|
|
||||||
disable_slave_recovery=true
|
|
||||||
```
|
|
||||||
|
|
||||||
**`master_accept_reads`** allows the master server to be used for reads. This is a useful option to enable if you are using a small number of servers and wish to use the master for reads as well.
|
**`master_accept_reads`** allows the master server to be used for reads. This is a useful option to enable if you are using a small number of servers and wish to use the master for reads as well.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user