diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-02-06 10:02:02 +0100 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-02-07 09:42:58 +0100 |
commit | 8672339328c30c894b4062f94c4fb0510fb20f9a (patch) | |
tree | 684a4dfb1b8269276e3602e3d716683aa369846a /mysql-test | |
parent | 734c4c01439488781837196ff09ad5f2c5276ead (diff) | |
download | mariadb-git-8672339328c30c894b4062f94c4fb0510fb20f9a.tar.gz |
MDEV-6676: Optimistic parallel replication
Adjust the configuration options, as discussed on the
maria-developers@ mailing list.
The option to hint a transaction to not be replicated in parallel is
now called @@skip_parallel_replication, consistent with
@@skip_replication.
And the --slave-parallel-mode is now simplified to have just one of
the following values:
none
minimal
conservative
optimistic
aggressive
This reflects successively harder efforts to find opportunities to run
things in parallel on the slave. It allows to extend the server with
more automatic heuristics in the future without having to introduce a
new configuration option for each and every one.
Diffstat (limited to 'mysql-test')
28 files changed, 159 insertions, 164 deletions
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 9bba18b170b..083f44ce966 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -66,7 +66,7 @@ if ($tmp) --echo Gtid_IO_Pos # --echo Replicate_Do_Domain_Ids --echo Replicate_Ignore_Domain_Ids - --echo Parallel_Mode domain,follow_master_commit + --echo Parallel_Mode conservative } if (!$tmp) { # Note: after WL#5177, fields 13-18 shall not be filtered-out. diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index bcda25c5f9b..dc2f2b3d270 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -922,15 +922,14 @@ The following options may be given as the first argument: replication. Only used when --slave-parallel-threads > 0. --slave-parallel-mode=name Controls what transactions are applied in parallel when - using --slave-parallel-threads. Syntax: - slave_parallel_mode=value[,value...], where "value" could - be one or more of: "domain", to apply different - replication domains in parallel; "follow_master_commit", - to apply in parallel transactions that group-committed - together on the master; "transactional", to - optimistically try to apply all transactional DML in - parallel; and "waiting" to extend "transactional" to even - transactions that had to wait on the master. + using --slave-parallel-threads. Possible values: + "optimistic" tries to apply most transactional DML in + parallel, and handles any conflicts with rollback and + retry. "conservative" limits parallelism in an effort to + avoid any conflicts. "aggressive" tries to maximise the + parallelism, possibly at the cost of increased conflict + rate. "minimal" only parallelizes the commit steps of + transactions. "none" disables parallel apply completely. --slave-parallel-threads=# If non-zero, number of threads to spawn to apply in parallel events on the slave that were group-committed on @@ -1351,7 +1350,7 @@ slave-exec-mode STRICT slave-max-allowed-packet 1073741824 slave-net-timeout 3600 slave-parallel-max-queued 131072 -slave-parallel-mode domain,follow_master_commit +slave-parallel-mode conservative slave-parallel-threads 0 slave-run-triggers-for-rbr NO slave-skip-errors (No default value) diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result index 40ebbbcd993..714c01d8426 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result @@ -341,7 +341,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result index 2522e1ae568..21b3d4f63be 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -2258,7 +2258,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -3892,7 +3892,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -4271,7 +4271,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -4850,7 +4850,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result index d14251dc2e6..5dea7c79bdb 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -2258,7 +2258,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -3915,7 +3915,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -4300,7 +4300,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -4889,7 +4889,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result index 82759613476..ad1a6ede9b7 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result @@ -137,7 +137,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result index 4fcbc260632..2d1e3b97b3f 100644 --- a/mysql-test/suite/binlog/r/binlog_row_annotate.result +++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result @@ -81,7 +81,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -334,7 +334,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -506,7 +506,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -749,7 +749,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -1002,7 +1002,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -1174,7 +1174,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index 24471795499..f2722924b6a 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -41,7 +41,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; @@ -253,7 +253,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.replicate_allow_parallel=1*//*!*/; +/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=1*//*!*/; diff --git a/mysql-test/suite/multi_source/info_logs.result b/mysql-test/suite/multi_source/info_logs.result index adab98d0e0c..6e6e4cf1503 100644 --- a/mysql-test/suite/multi_source/info_logs.result +++ b/mysql-test/suite/multi_source/info_logs.result @@ -85,16 +85,16 @@ MASTER 2.2 # show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 relay.000002 601 master-bin.000001 Yes Yes 0 0 313 888 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000 -MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 relay-master@00202@002e2.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 relay.000002 601 master-bin.000001 Yes Yes 0 0 313 888 None 0 No 0 No 0 0 1 No conservative 0 1073741824 7 0 60.000 +MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 relay-master@00202@002e2.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 include/wait_for_slave_to_start.inc set default_master_connection = 'MASTER 2.2'; include/wait_for_slave_to_start.inc set default_master_connection = ''; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 relay.000004 536 master-bin.000001 Yes Yes 0 0 313 823 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 6 0 60.000 -MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 relay-master@00202@002e2.000004 536 master-bin.000001 Yes Yes 0 0 313 842 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 6 0 60.000 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 relay.000004 536 master-bin.000001 Yes Yes 0 0 313 823 None 0 No 0 No 0 0 1 No conservative 0 1073741824 6 0 60.000 +MASTER 2.2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 relay-master@00202@002e2.000004 536 master-bin.000001 Yes Yes 0 0 313 842 None 0 No 0 No 0 0 2 No conservative 0 1073741824 6 0 60.000 # # List of files matching '*info*' pattern # after slave server restart diff --git a/mysql-test/suite/multi_source/multisource.result b/mysql-test/suite/multi_source/multisource.result index 1647da74218..4475ec58c6f 100644 --- a/mysql-test/suite/multi_source/multisource.result +++ b/mysql-test/suite/multi_source/multisource.result @@ -11,13 +11,13 @@ set default_master_connection = 'master1'; include/wait_for_slave_to_start.inc show slave 'master1' status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode -Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No domain,follow_master_commit +Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No conservative show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode -Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No domain,follow_master_commit +Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No conservative show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000 +master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-master1.000002 601 master-bin.000001 Yes Yes 0 0 313 907 None 0 No 0 No 0 0 1 No conservative 0 1073741824 7 0 60.000 drop database if exists db1; create database db1; use db1; @@ -76,8 +76,8 @@ start slave; include/wait_for_slave_to_start.inc show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin.000002 601 master-bin.000001 Yes Yes 0 0 313 899 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000 0-1-4 -master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 988 mysqld-relay-bin-master1.000002 1276 master-bin.000001 Yes Yes 0 0 988 1582 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 17 0 60.000 0-1-4 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin.000002 601 master-bin.000001 Yes Yes 0 0 313 899 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 0-1-4 +master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 988 mysqld-relay-bin-master1.000002 1276 master-bin.000001 Yes Yes 0 0 988 1582 None 0 No 0 No 0 0 1 No conservative 0 1073741824 17 0 60.000 0-1-4 insert into t1 (f1) values ('three'); drop database if exists db2; create database db2; @@ -106,8 +106,8 @@ insert into t1 (f1) values ('four'); create table db1.t3 (f1 int) engine=InnoDB; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos - Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 921 mysqld-relay-bin.000002 1209 master-bin.000001 Yes Yes 0 0 921 1507 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 17 0 60.000 0-1-7 -master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000002 740 mysqld-relay-bin-master1.000004 1028 master-bin.000002 Yes Yes 0 0 740 1378 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 37 0 60.000 0-1-7 + Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 921 mysqld-relay-bin.000002 1209 master-bin.000001 Yes Yes 0 0 921 1507 None 0 No 0 No 0 0 2 No conservative 0 1073741824 17 0 60.000 0-1-7 +master1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000002 740 mysqld-relay-bin-master1.000004 1028 master-bin.000002 Yes Yes 0 0 740 1378 None 0 No 0 No 0 0 1 No conservative 0 1073741824 37 0 60.000 0-1-7 select * from db1.t1; i f1 1 one diff --git a/mysql-test/suite/multi_source/reset_slave.result b/mysql-test/suite/multi_source/reset_slave.result index c968d705a81..5e28047945d 100644 --- a/mysql-test/suite/multi_source/reset_slave.result +++ b/mysql-test/suite/multi_source/reset_slave.result @@ -11,14 +11,14 @@ insert into t1 values (1),(2); stop slave 'master1'; show slave 'master1' status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode - 127.0.0.1 root MYPORT_1 60 master-bin.000001 802 mysqld-relay-bin-master1.000002 1090 master-bin.000001 No No 0 0 802 1396 None 0 No NULL No 0 0 1 No domain,follow_master_commit + 127.0.0.1 root MYPORT_1 60 master-bin.000001 802 mysqld-relay-bin-master1.000002 1090 master-bin.000001 No No 0 0 802 1396 None 0 No NULL No 0 0 1 No conservative mysqld-relay-bin-master1.000001 mysqld-relay-bin-master1.000002 mysqld-relay-bin-master1.index reset slave 'master1'; show slave 'master1' status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode - 127.0.0.1 root MYPORT_1 60 4 1090 No No 0 0 0 1396 None 0 No NULL No 0 0 1 No domain,follow_master_commit + 127.0.0.1 root MYPORT_1 60 4 1090 No No 0 0 0 1396 None 0 No NULL No 0 0 1 No conservative reset slave 'master1' all; show slave 'master1' status; ERROR HY000: There is no master connection 'master1' diff --git a/mysql-test/suite/multi_source/simple.result b/mysql-test/suite/multi_source/simple.result index 6c6e15bb750..405e60c28fe 100644 --- a/mysql-test/suite/multi_source/simple.result +++ b/mysql-test/suite/multi_source/simple.result @@ -11,8 +11,8 @@ include/wait_for_slave_to_start.inc set default_master_connection = ''; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-slave1.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000 -slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000 +slave1 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 313 mysqld-relay-bin-slave1.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 1 No conservative 0 1073741824 7 0 60.000 +slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 start all slaves; stop slave 'slave1'; show slave 'slave1' status; @@ -62,22 +62,22 @@ Using_Gtid No Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids -Parallel_Mode domain,follow_master_commit +Parallel_Mode conservative reset slave 'slave1'; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave1 127.0.0.1 root MYPORT_1 60 4 601 No No 0 0 0 906 None 0 No NULL No 0 0 1 No domain,follow_master_commit 0 1073741824 7 0 60.000 -slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000 +slave1 127.0.0.1 root MYPORT_1 60 4 601 No No 0 0 0 906 None 0 No NULL No 0 0 1 No conservative 0 1073741824 7 0 60.000 +slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 reset slave 'slave1' all; show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000 +slave2 Slave has read all relay log; waiting for the slave I/O thread to update it Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 Yes Yes 0 0 313 906 None 0 No 0 No 0 0 2 No conservative 0 1073741824 7 0 60.000 stop all slaves; Warnings: Note 1938 SLAVE 'slave2' stopped show all slaves status; Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos -slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 No No 0 0 313 906 None 0 No NULL No 0 0 2 No domain,follow_master_commit 0 1073741824 7 0 60.000 +slave2 127.0.0.1 root MYPORT_2 60 master-bin.000001 313 mysqld-relay-bin-slave2.000002 601 master-bin.000001 No No 0 0 313 906 None 0 No NULL No 0 0 2 No conservative 0 1073741824 7 0 60.000 stop all slaves; include/reset_master_slave.inc include/reset_master_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index a49d1f3ae60..34eaa489c59 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -1138,18 +1138,16 @@ SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; include/start_slave.inc *** MDEV-6676 - test syntax of @@slave_parallel_mode *** -Parallel_Mode = 'domain,follow_master_commit' +Parallel_Mode = 'conservative' include/stop_slave.inc -SET GLOBAL slave_parallel_mode='domain,follow_master_commit,transactional'; -ERROR HY000: Invalid use of 'transactional' option for slave_parallel_mode -SET GLOBAL slave_parallel_mode='waiting,transactional,domain'; -Parallel_Mode = 'domain,transactional,waiting' -SET GLOBAL slave_parallel_mode='domain,follow_master_commit'; -Parallel_Mode = 'domain,follow_master_commit' +SET GLOBAL slave_parallel_mode='aggressive'; +Parallel_Mode = 'aggressive' +SET GLOBAL slave_parallel_mode='conservative'; +Parallel_Mode = 'conservative' *** MDEV-6676 - test that empty parallel_mode does not replicate in parallel *** INSERT INTO t2 VALUES (1040); include/save_master_gtid.inc -SET GLOBAL slave_parallel_mode=''; +SET GLOBAL slave_parallel_mode='none'; SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,slave_crash_if_parallel_apply"; include/start_slave.inc @@ -1177,7 +1175,7 @@ INSERT INTO t2 VALUES (1045); INSERT INTO t2 VALUES (1046); SET gtid_domain_id = 0; include/save_master_gtid.inc -SET GLOBAL slave_parallel_mode=follow_master_commit; +SET GLOBAL slave_parallel_mode=minimal; include/start_slave.inc include/sync_with_master_gtid.inc SELECT * FROM t2 WHERE a >= 1040 ORDER BY a; @@ -1190,7 +1188,7 @@ a 1045 1046 include/stop_slave.inc -SET GLOBAL slave_parallel_mode='domain,follow_master_commit'; +SET GLOBAL slave_parallel_mode='conservative'; include/start_slave.inc include/stop_slave.inc SET GLOBAL slave_parallel_threads=@old_parallel_threads; diff --git a/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result b/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result index fe45abdc196..ae9389c6266 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_multilevel.result @@ -6,26 +6,26 @@ include/stop_slave.inc SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='optimistic'; SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; include/stop_slave.inc SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='optimistic'; SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; include/stop_slave.inc SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; -*** MDEV-6676: Test that @@replicate_allow_parallel is preserved in slave binlog *** +SET GLOBAL slave_parallel_mode='optimistic'; +*** MDEV-6676: Test that @@skip_parallel_replication is preserved in slave binlog *** INSERT INTO t1 VALUES(1,1); BEGIN; INSERT INTO t1 VALUES(2,1); INSERT INTO t1 VALUES(3,1); COMMIT; -SET SESSION replicate_allow_parallel=0; +SET SESSION skip_parallel_replication=1; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; @@ -36,7 +36,7 @@ UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; -SET SESSION replicate_allow_parallel=1; +SET SESSION skip_parallel_replication=0; SELECT * FROM t1 ORDER BY a; a b 1 1 @@ -73,13 +73,13 @@ Ok, no retry *** MDEV-6676: Test that the FL_WAITED flag in GTID is preserved in slave binlog *** include/stop_slave.inc CHANGE MASTER TO master_use_gtid=slave_pos; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; include/stop_slave.inc CHANGE MASTER TO master_use_gtid=slave_pos; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; include/stop_slave.inc CHANGE MASTER TO master_use_gtid=slave_pos; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; BEGIN; UPDATE t1 SET b=b+1 WHERE a=2; SET debug_sync="thd_report_wait_for SIGNAL waiting1"; diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index 1f885c7e0e1..2c34a54af1e 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -6,7 +6,7 @@ include/stop_slave.inc SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; INSERT INTO t1 VALUES(1,1); BEGIN; INSERT INTO t1 VALUES(2,1); @@ -121,10 +121,10 @@ c 204 205 206 -*** Test @@replicate_allow_parallel. *** +*** Test @@skip_parallel_replication. *** include/stop_slave.inc UPDATE t1 SET b=10 WHERE a=3; -SET SESSION replicate_allow_parallel=0; +SET SESSION skip_parallel_replication=1; UPDATE t1 SET b=20 WHERE a=3; UPDATE t1 SET b=30 WHERE a=3; UPDATE t1 SET b=50 WHERE a=3; @@ -134,7 +134,7 @@ UPDATE t1 SET b=210 WHERE a=3; UPDATE t1 SET b=340 WHERE a=3; UPDATE t1 SET b=550 WHERE a=3; UPDATE t1 SET b=890 WHERE a=3; -SET SESSION replicate_allow_parallel=1; +SET SESSION skip_parallel_replication=0; SELECT * FROM t1 ORDER BY a; a b 1 2 diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result index d51eb295605..91970f3eeb5 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_nobinlog.result @@ -11,7 +11,7 @@ SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='aggressive'; *** Test that we replicate correctly when using READ COMMITTED and --log-slave-updates=0 on the slave *** INSERT INTO t1 SELECT 4, COUNT(*) FROM t2; INSERT INTO t2 SELECT 4, COUNT(*) FROM t1; diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index 2f5a45d00ca..3711e8327d8 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -1847,12 +1847,10 @@ SET GLOBAL slave_parallel_threads=10; --let $status_items= Parallel_Mode --source include/show_slave_status.inc --source include/stop_slave.inc ---error ER_INVALID_SLAVE_PARALLEL_MODE -SET GLOBAL slave_parallel_mode='domain,follow_master_commit,transactional'; -SET GLOBAL slave_parallel_mode='waiting,transactional,domain'; +SET GLOBAL slave_parallel_mode='aggressive'; --let $status_items= Parallel_Mode --source include/show_slave_status.inc -SET GLOBAL slave_parallel_mode='domain,follow_master_commit'; +SET GLOBAL slave_parallel_mode='conservative'; --let $status_items= Parallel_Mode --source include/show_slave_status.inc @@ -1863,7 +1861,7 @@ INSERT INTO t2 VALUES (1040); --source include/save_master_gtid.inc --connection server_2 -SET GLOBAL slave_parallel_mode=''; +SET GLOBAL slave_parallel_mode='none'; # Test that we do not use parallel apply, by injecting an unconditional # crash in the parallel apply code. SET @old_dbug= @@GLOBAL.debug_dbug; @@ -1897,12 +1895,12 @@ INSERT INTO t2 VALUES (1046); SET gtid_domain_id = 0; --source include/save_master_gtid.inc --connection server_2 -SET GLOBAL slave_parallel_mode=follow_master_commit; +SET GLOBAL slave_parallel_mode=minimal; --source include/start_slave.inc --source include/sync_with_master_gtid.inc SELECT * FROM t2 WHERE a >= 1040 ORDER BY a; --source include/stop_slave.inc -SET GLOBAL slave_parallel_mode='domain,follow_master_commit'; +SET GLOBAL slave_parallel_mode='conservative'; --source include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test b/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test index 8f6ae7f2e16..168b7ea5167 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_multilevel.test @@ -18,7 +18,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='optimistic'; --connection server_3 @@ -29,7 +29,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='optimistic'; --connection server_4 @@ -39,10 +39,10 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='optimistic'; ---echo *** MDEV-6676: Test that @@replicate_allow_parallel is preserved in slave binlog *** +--echo *** MDEV-6676: Test that @@skip_parallel_replication is preserved in slave binlog *** --connection server_1 INSERT INTO t1 VALUES(1,1); @@ -52,10 +52,10 @@ INSERT INTO t1 VALUES(3,1); COMMIT; # Do a lot of updates on same row in sequence. These would be likely to cause # conflicts and rollbacks in optimistic parallel replication, but we disable -# that by disabling @@replicate_allow_parallel. We can test that the flag is +# that by enabling @@skip_parallel_replication. We can test that the flag is # preserved down the replication hierarchy by checking that no slave retries # are made. -SET SESSION replicate_allow_parallel=0; +SET SESSION skip_parallel_replication=1; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; @@ -66,7 +66,7 @@ UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; UPDATE t1 SET b=b+1 WHERE a=2; -SET SESSION replicate_allow_parallel=1; +SET SESSION skip_parallel_replication=0; SELECT * FROM t1 ORDER BY a; --source include/save_master_gtid.inc @@ -112,19 +112,19 @@ eval SELECT IF($retry1=$retry2, "Ok, no retry", --connection server_2 --source include/stop_slave.inc CHANGE MASTER TO master_use_gtid=slave_pos; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; --connection server_3 --source include/stop_slave.inc CHANGE MASTER TO master_use_gtid=slave_pos; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; --connection server_4 --source include/stop_slave.inc CHANGE MASTER TO master_use_gtid=slave_pos; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; --connection server_1 # Do a lot of updates on same row in sequence. Ensure that all of these but the diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index c1f35588267..7afeb9e2779 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -15,7 +15,7 @@ SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional'; +SET GLOBAL slave_parallel_mode='optimistic'; --connection server_1 @@ -106,7 +106,7 @@ SELECT * FROM t3 ORDER BY c; #SHOW STATUS LIKE 'Slave_retried_transactions'; ---echo *** Test @@replicate_allow_parallel. *** +--echo *** Test @@skip_parallel_replication. *** --connection server_2 --source include/stop_slave.inc @@ -114,11 +114,11 @@ SELECT * FROM t3 ORDER BY c; --connection server_1 # We do a bunch of conflicting transactions on the master with -# replicate_allow_parallel set to false, and check that we do not +# skip_parallel_replication set to true, and check that we do not # get any retries on the slave. UPDATE t1 SET b=10 WHERE a=3; -SET SESSION replicate_allow_parallel=0; +SET SESSION skip_parallel_replication=1; UPDATE t1 SET b=20 WHERE a=3; UPDATE t1 SET b=30 WHERE a=3; UPDATE t1 SET b=50 WHERE a=3; @@ -128,7 +128,7 @@ UPDATE t1 SET b=210 WHERE a=3; UPDATE t1 SET b=340 WHERE a=3; UPDATE t1 SET b=550 WHERE a=3; UPDATE t1 SET b=890 WHERE a=3; -SET SESSION replicate_allow_parallel=1; +SET SESSION skip_parallel_replication=0; SELECT * FROM t1 ORDER BY a; --source include/save_master_gtid.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test index 63a994d0fff..94924147dce 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.test @@ -21,7 +21,7 @@ SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_use_gtid=slave_pos; SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; -SET GLOBAL slave_parallel_mode='domain,transactional,waiting'; +SET GLOBAL slave_parallel_mode='aggressive'; --echo *** Test that we replicate correctly when using READ COMMITTED and --log-slave-updates=0 on the slave *** diff --git a/mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result b/mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result deleted file mode 100644 index f612bb7ec0c..00000000000 --- a/mysql-test/suite/sys_vars/r/replicate_allow_parallel_basic.result +++ /dev/null @@ -1,15 +0,0 @@ -SELECT @@global.replicate_allow_parallel; -ERROR HY000: Variable 'replicate_allow_parallel' is a SESSION variable -SET GLOBAL replicate_allow_parallel= 1; -ERROR HY000: Variable 'replicate_allow_parallel' is a SESSION variable and can't be used with SET GLOBAL -SELECT @@session.replicate_allow_parallel; -@@session.replicate_allow_parallel -1 -SET SESSION replicate_allow_parallel= 0; -SELECT @@session.replicate_allow_parallel; -@@session.replicate_allow_parallel -0 -SET SESSION replicate_allow_parallel= 1; -SELECT @@session.replicate_allow_parallel; -@@session.replicate_allow_parallel -1 diff --git a/mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result b/mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result new file mode 100644 index 00000000000..963331805b0 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/skip_parallel_replication_basic.result @@ -0,0 +1,15 @@ +SELECT @@global.skip_parallel_replication; +ERROR HY000: Variable 'skip_parallel_replication' is a SESSION variable +SET GLOBAL skip_parallel_replication= 0; +ERROR HY000: Variable 'skip_parallel_replication' is a SESSION variable and can't be used with SET GLOBAL +SELECT @@session.skip_parallel_replication; +@@session.skip_parallel_replication +0 +SET SESSION skip_parallel_replication= 1; +SELECT @@session.skip_parallel_replication; +@@session.skip_parallel_replication +1 +SET SESSION skip_parallel_replication= 0; +SELECT @@session.skip_parallel_replication; +@@session.skip_parallel_replication +0 diff --git a/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result b/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result index e997cc49f12..e4c9134374a 100644 --- a/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result +++ b/mysql-test/suite/sys_vars/r/slave_parallel_mode_basic.result @@ -1,8 +1,8 @@ -SET SESSION slave_parallel_mode= ''; +SET SESSION slave_parallel_mode= none; ERROR HY000: Variable 'slave_parallel_mode' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@slave_parallel_mode; @@slave_parallel_mode -domain +minimal SELECT @@m1.slave_parallel_mode; @@m1.slave_parallel_mode NULL @@ -12,39 +12,39 @@ Warning 1617 There is no master connection 'm1' CHANGE MASTER TO master_host='127.0.0.1', master_port=3310, master_user='root'; SELECT @@``.slave_parallel_mode; @@``.slave_parallel_mode -domain +minimal SELECT @@slave_parallel_mode; @@slave_parallel_mode -domain -Parallel_Mode = 'domain' +minimal +Parallel_Mode = 'minimal' SELECT @@m2.slave_parallel_mode; @@m2.slave_parallel_mode NULL Warnings: Warning 1617 There is no master connection 'm2' Warning 1617 There is no master connection 'm2' -SET GLOBAL m2.slave_parallel_mode = ''; +SET GLOBAL m2.slave_parallel_mode = none; Warnings: Warning 1617 There is no master connection 'm2' CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root'; SELECT @@m1.slave_parallel_mode; @@m1.slave_parallel_mode -transactional -Parallel_Mode = 'domain' -SET GLOBAL m1.slave_parallel_mode= follow_master_commit; -Parallel_Mode = 'domain' +optimistic +Parallel_Mode = 'minimal' +SET GLOBAL m1.slave_parallel_mode= conservative; +Parallel_Mode = 'minimal' SET default_master_connection= 'm1'; SELECT @@slave_parallel_mode; @@slave_parallel_mode -follow_master_commit -SET GLOBAL slave_parallel_mode= waiting; +conservative +SET GLOBAL slave_parallel_mode= aggressive; SELECT @@slave_parallel_mode; @@slave_parallel_mode -waiting -Parallel_Mode = 'waiting' +aggressive +Parallel_Mode = 'aggressive' SET default_master_connection= ''; SELECT @@slave_parallel_mode; @@slave_parallel_mode -domain +minimal RESET SLAVE ALL; RESET SLAVE 'm1' ALL; diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index 07e86e4f9ea..8a793eaeec9 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -3395,20 +3395,6 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME REPLICATE_ALLOW_PARALLEL -SESSION_VALUE ON -GLOBAL_VALUE NULL -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE ON -VARIABLE_SCOPE SESSION ONLY -VARIABLE_TYPE BOOLEAN -VARIABLE_COMMENT If set when a transaction is written to the binlog, that transaction is allowed to replicate in parallel on a slave where slave_parallel_mode is set to "transactional". Can be cleared for transactions that are likely to cause a conflict if replicated in parallel, to avoid unnecessary rollback and retry. -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST OFF,ON -READ_ONLY NO -COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME REPLICATE_ANNOTATE_ROW_EVENTS SESSION_VALUE NULL GLOBAL_VALUE OFF @@ -3675,6 +3661,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON READ_ONLY YES COMMAND_LINE_ARGUMENT OPTIONAL +VARIABLE_NAME SKIP_PARALLEL_REPLICATION +SESSION_VALUE OFF +GLOBAL_VALUE NULL +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE OFF +VARIABLE_SCOPE SESSION ONLY +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT If set when a transaction is written to the binlog, parallel apply of that transaction will be avoided on a slave where slave_parallel_mode is not "aggressive". Can be used to avoid unnecessary rollback and retry for transactions that are likely to cause a conflict if replicated in parallel. +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY NO +COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME SKIP_REPLICATION SESSION_VALUE OFF GLOBAL_VALUE NULL @@ -3817,16 +3817,16 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME SLAVE_PARALLEL_MODE SESSION_VALUE NULL -GLOBAL_VALUE domain,follow_master_commit +GLOBAL_VALUE conservative GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE domain,follow_master_commit +DEFAULT_VALUE conservative VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE SET -VARIABLE_COMMENT Controls what transactions are applied in parallel when using --slave-parallel-threads. Syntax: slave_parallel_mode=value[,value...], where "value" could be one or more of: "domain", to apply different replication domains in parallel; "follow_master_commit", to apply in parallel transactions that group-committed together on the master; "transactional", to optimistically try to apply all transactional DML in parallel; and "waiting" to extend "transactional" to even transactions that had to wait on the master. +VARIABLE_TYPE ENUM +VARIABLE_COMMENT Controls what transactions are applied in parallel when using --slave-parallel-threads. Possible values: "optimistic" tries to apply most transactional DML in parallel, and handles any conflicts with rollback and retry. "conservative" limits parallelism in an effort to avoid any conflicts. "aggressive" tries to maximise the parallelism, possibly at the cost of increased conflict rate. "minimal" only parallelizes the commit steps of transactions. "none" disables parallel apply completely. NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST domain,follow_master_commit,transactional,waiting +ENUM_VALUE_LIST none,minimal,conservative,optimistic,aggressive READ_ONLY NO COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME SLAVE_PARALLEL_THREADS diff --git a/mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test b/mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test deleted file mode 100644 index 46dcbc7fafb..00000000000 --- a/mysql-test/suite/sys_vars/t/replicate_allow_parallel_basic.test +++ /dev/null @@ -1,14 +0,0 @@ ---source include/not_embedded.inc - ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SELECT @@global.replicate_allow_parallel; - ---error ER_LOCAL_VARIABLE -SET GLOBAL replicate_allow_parallel= 1; -SELECT @@session.replicate_allow_parallel; -SET SESSION replicate_allow_parallel= 0; -SELECT @@session.replicate_allow_parallel; -SET SESSION replicate_allow_parallel= 1; -SELECT @@session.replicate_allow_parallel; - -# More testing of the actual functionality in rpl.rpl_parallel_* tests. diff --git a/mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test b/mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test new file mode 100644 index 00000000000..3ccac558ea4 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/skip_parallel_replication_basic.test @@ -0,0 +1,14 @@ +--source include/not_embedded.inc + +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@global.skip_parallel_replication; + +--error ER_LOCAL_VARIABLE +SET GLOBAL skip_parallel_replication= 0; +SELECT @@session.skip_parallel_replication; +SET SESSION skip_parallel_replication= 1; +SELECT @@session.skip_parallel_replication; +SET SESSION skip_parallel_replication= 0; +SELECT @@session.skip_parallel_replication; + +# More testing of the actual functionality in rpl.rpl_parallel_* tests. diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt index cc40fa4761f..cd2ccb7eb8b 100644 --- a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt +++ b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic-master.opt @@ -1 +1 @@ ---slave-parallel-mode=domain --m1.slave-parallel-mode=transactional --m2.slave-parallel-mode=domain,follow_master_commit,waiting +--slave-parallel-mode=minimal --m1.slave-parallel-mode=optimistic --m2.slave-parallel-mode=aggressive diff --git a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test index 6e82345b8da..4d233b11cc2 100644 --- a/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test +++ b/mysql-test/suite/sys_vars/t/slave_parallel_mode_basic.test @@ -3,7 +3,7 @@ # Also tests some command line options, in slave_parallel_mode_basic-master.opt --error ER_GLOBAL_VARIABLE -SET SESSION slave_parallel_mode= ''; +SET SESSION slave_parallel_mode= none; SELECT @@slave_parallel_mode; SELECT @@m1.slave_parallel_mode; @@ -15,16 +15,16 @@ SELECT @@slave_parallel_mode; --source include/show_slave_status.inc SELECT @@m2.slave_parallel_mode; -SET GLOBAL m2.slave_parallel_mode = ''; +SET GLOBAL m2.slave_parallel_mode = none; CHANGE MASTER 'm1' TO master_host='127.0.0.1', master_port=3311, master_user='root'; SELECT @@m1.slave_parallel_mode; --source include/show_slave_status.inc -SET GLOBAL m1.slave_parallel_mode= follow_master_commit; +SET GLOBAL m1.slave_parallel_mode= conservative; --source include/show_slave_status.inc SET default_master_connection= 'm1'; SELECT @@slave_parallel_mode; -SET GLOBAL slave_parallel_mode= waiting; +SET GLOBAL slave_parallel_mode= aggressive; SELECT @@slave_parallel_mode; --source include/show_slave_status.inc SET default_master_connection= ''; |