|
31 | 31 | # Simon Greenaway Adam Stein Isart Montane |
32 | 32 | # Baptiste M. Cole Turner Major Hayden |
33 | 33 | # Joe Ashcraft Jean-Marie Renouard Christian Loos |
| 34 | +# Julien Francoz |
34 | 35 | # |
35 | 36 | # Inspired by Matthew Montgomery's tuning-primer.sh script: |
36 | 37 | # http://forge.mysql.com/projects/view.php?id=44 |
@@ -5044,9 +5045,24 @@ sub mariadb_galera { |
5044 | 5045 | if (get_wsrep_option('wsrep_slave_threads') > `nproc`*4 or get_wsrep_option('wsrep_slave_threads') < `nproc`*3) { |
5045 | 5046 | badprint "wsrep_slave_threads is not equal to 3 or 4 times number of CPU(s)"; |
5046 | 5047 | push @adjvars, "wsrep_slave_threads= Nb of Core CPU * 4"; |
5047 | | - } else { |
| 5048 | + } else { |
5048 | 5049 | goodprint "wsrep_slave_threads is equal to 3 or 4 times number of CPU(s)"; |
5049 | | - } |
| 5050 | + } |
| 5051 | + |
| 5052 | + if ($myvar{'wsrep_slave_threads'} > 1) { |
| 5053 | +badprint "wsrep parallel slave can cause frequent inconsistency crash."; |
| 5054 | + push @adjvars, "Set wsrep_slave_threads to 1 in case of HA_ERR_FOUND_DUPP_KEY crash on slave"; |
| 5055 | + # check options for parallel slave |
| 5056 | + if ($myvar{'wsrep_slave_FK_checks'} eq "OFF") { |
| 5057 | + badprint "wsrep_slave_FK_checks is off with parallel slave"; |
| 5058 | + push @adjvars, "wsrep_slave_FK_checks should be ON when using parallel slave"; |
| 5059 | + } |
| 5060 | +# wsrep_slave_UK_checks seems useless in MySQL source code |
| 5061 | + if ($myvar{'innodb_autoinc_lock_mode'} != 2) { |
| 5062 | + badprint "innodb_autoinc_lock_mode is incorrect with parallel slave"; |
| 5063 | + push @adjvars, "innodb_autoinc_lock_mode should be 2 when using parallel slave"; |
| 5064 | + } |
| 5065 | + } |
5050 | 5066 |
|
5051 | 5067 | if (get_wsrep_option('gcs.limit') != get_wsrep_option('wsrep_slave_threads') *5 ) { |
5052 | 5068 | badprint "gcs.limit should be equal to 5 * wsrep_slave_threads"; |
|
0 commit comments