we've know the machenism of semi-synchronous replication in my previous article,let's do some test to learn more details about it.now i have three virtual machines in my test environment,one master and the other two slaves are replicated from master which based on GTID mode.the replication method is asynchronous at the moment.okay here we go.

 .Install the plugin of semi-synchronous replication on master.
root@localhost:mysql3306.sock [(none)]::>INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
Query OK, rows affected (0.11 sec) root@localhost:mysql3306.sock [(none)]::>SELECT PLUGIN_NAME, PLUGIN_STATUS
-> FROM INFORMATION_SCHEMA.PLUGINS
-> WHERE PLUGIN_NAME LIKE '%semi%';
+----------------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+----------------------+---------------+
| rpl_semi_sync_master | ACTIVE |
+----------------------+---------------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::>show plugins;
+----------------------------+----------+--------------------+--------------------+---------+
| Name | Status | Type | Library | License |
+----------------------------+----------+--------------------+--------------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| sha256_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_PER_INDEX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_PER_INDEX_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_TEMP_TABLE_INFO | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_FT_DEFAULT_STOPWORD | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_FT_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_FT_BEING_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_FT_CONFIG | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_FT_INDEX_CACHE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_FT_INDEX_TABLE | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_DATAFILES | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_SYS_VIRTUAL | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |
| FEDERATED | DISABLED | STORAGE ENGINE | NULL | GPL |
| ngram | ACTIVE | FTPARSER | NULL | GPL |
| rpl_semi_sync_master | ACTIVE | REPLICATION | semisync_master.so | GPL | -- Here you'll see plugin "rpl_semi_sync_master" has been installed
+----------------------------+----------+--------------------+--------------------+---------+
rows in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> .Install the plugin of semi-synchronous replication on slave .
root@localhost:mysql.sock [(none)]::>INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
Query OK, rows affected (0.06 sec) root@localhost:mysql.sock [(none)]::>SELECT PLUGIN_NAME, PLUGIN_STATUS
-> FROM INFORMATION_SCHEMA.PLUGINS
-> WHERE PLUGIN_NAME LIKE '%semi%';
+---------------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+---------------------+---------------+
| rpl_semi_sync_slave | ACTIVE |
+---------------------+---------------+
row in set (0.00 sec) root@localhost:mysql.sock [(none)]::> .Install the plugin of semi-synchronous replication on slave .
root@localhost:mysql3306.sock [(none)]::>INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
Query OK, rows affected (0.09 sec) root@localhost:mysql3306.sock [(none)]::>SELECT PLUGIN_NAME, PLUGIN_STATUS
-> FROM INFORMATION_SCHEMA.PLUGINS
-> WHERE PLUGIN_NAME LIKE '%semi%';
+---------------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+---------------------+---------------+
| rpl_semi_sync_slave | ACTIVE |
+---------------------+---------------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> .Enbale the semi-synchronous replication on master.
root@localhost:mysql3306.sock [(none)]::>SET GLOBAL rpl_semi_sync_master_enabled=; -- The parameter can be changed at runtime.
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [(none)]::>show global status like 'rpl%'; -- We can see all the status about semi-synchronous replication here.
+--------------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------------+-------+
| Rpl_semi_sync_master_clients | |
| Rpl_semi_sync_master_net_avg_wait_time | |
| Rpl_semi_sync_master_net_wait_time | |
| Rpl_semi_sync_master_net_waits | |
| Rpl_semi_sync_master_no_times | |
| Rpl_semi_sync_master_no_tx | |
| Rpl_semi_sync_master_status | ON |
| Rpl_semi_sync_master_timefunc_failures | |
| Rpl_semi_sync_master_tx_avg_wait_time | |
| Rpl_semi_sync_master_tx_wait_time | |
| Rpl_semi_sync_master_tx_waits | |
| Rpl_semi_sync_master_wait_pos_backtraverse | |
| Rpl_semi_sync_master_wait_sessions | |
| Rpl_semi_sync_master_yes_tx | |
+--------------------------------------------+-------+
rows in set (0.00 sec) .Enbale the semi-synchronous replication on salve .
root@localhost:mysql.sock [(none)]::>SET GLOBAL rpl_semi_sync_slave_enabled=;
Query OK, rows affected (0.00 sec) root@localhost:mysql.sock [(none)]::>show global status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | OFF | -- It's still "OFF" now,'cause the sql IO_Thread should be restart.
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql.sock [(none)]::>stop slave io_thread;
Query OK, rows affected (0.00 sec) root@localhost:mysql.sock [(none)]::>start slave io_thread;
Query OK, rows affected (0.00 sec) root@localhost:mysql.sock [(none)]::>show global status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON | -- Now,the value has become "ON"
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql.sock [(none)]::> .Enbale the semi-synchronous replication on salve .
root@localhost:mysql3306.sock [(none)]::>SET GLOBAL rpl_semi_sync_slave_enabled=;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [(none)]::>show global status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | OFF |
+----------------------------+-------+
row in set (0.01 sec) root@localhost:mysql3306.sock [(none)]::>stop slave io_thread;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [(none)]::>start slave io_thread;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [(none)]::>show global status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON |
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> .check the status of master again.
root@localhost:mysql3306.sock [(none)]::>show global status like 'rpl%';
+--------------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------------+-------+
| Rpl_semi_sync_master_clients | | -- This value of status will show how many slave in semi_synchronous mode you really have.
| Rpl_semi_sync_master_net_avg_wait_time | |
| Rpl_semi_sync_master_net_wait_time | |
| Rpl_semi_sync_master_net_waits | |
| Rpl_semi_sync_master_no_times | |
| Rpl_semi_sync_master_no_tx | |
| Rpl_semi_sync_master_status | ON |
| Rpl_semi_sync_master_timefunc_failures | |
| Rpl_semi_sync_master_tx_avg_wait_time | |
| Rpl_semi_sync_master_tx_wait_time | |
| Rpl_semi_sync_master_tx_waits | |
| Rpl_semi_sync_master_wait_pos_backtraverse | |
| Rpl_semi_sync_master_wait_sessions | |
| Rpl_semi_sync_master_yes_tx | |
+--------------------------------------------+-------+
rows in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> .Let's do some tests with semi-synchronous replication,create a table and insert several records on master.
root@localhost:mysql3306.sock [(none)]::>use zlm;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
root@localhost:mysql3306.sock [zlm]::>create table semi_sync_test(
-> id int auto_increment,
-> name char() not null default '',
-> primary key(id)
-> ) engine=innodb charset=utf8;
Query OK, rows affected (0.04 sec) root@localhost:mysql3306.sock [zlm]::>insert into semi_sync_test(name) values('aaa');
Query OK, row affected (0.00 sec) root@localhost:mysql3306.sock [zlm]::>show global status like 'rpl%';
+--------------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------------+-------+
| Rpl_semi_sync_master_clients | |
| Rpl_semi_sync_master_net_avg_wait_time | |
| Rpl_semi_sync_master_net_wait_time | |
| Rpl_semi_sync_master_net_waits | | -- The times of master waiting for slave replies(two slaves plus two transcations got ).
| Rpl_semi_sync_master_no_times | |
| Rpl_semi_sync_master_no_tx | |
| Rpl_semi_sync_master_status | ON |
| Rpl_semi_sync_master_timefunc_failures | |
| Rpl_semi_sync_master_tx_avg_wait_time | | -- Total avertage time master has waited for transaction.
| Rpl_semi_sync_master_tx_wait_time | | -- Total time master has waited for transaction.(two transactions plus got ).
| Rpl_semi_sync_master_tx_waits | | -- I generated two transactions just now,the figure here is ""
| Rpl_semi_sync_master_wait_pos_backtraverse | |
| Rpl_semi_sync_master_wait_sessions | |
| Rpl_semi_sync_master_yes_tx | | -- The two transactions were all acknowleged by the two slaves.
+--------------------------------------------+-------+
rows in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> here's some messages from error log: --10T12::.265030Z [Note] Semi-sync replication initialized for transactions.
--10T12::.265060Z [Note] Semi-sync replication enabled on the master.
--10T12::.265349Z [Note] Starting ack receiver thread -- There's a individual thread called "ack receiver"
--10T12::.754330Z [Note] Aborted connection to db: 'unconnected' user: 'root' host: 'localhost' (Got timeout reading communication packets)
--10T12::.658621Z [Note] While initializing dump thread for slave with UUID <27af30ca--11e8-ad7e-080027de0e0e>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread().
--10T12::.658773Z [Note] Start binlog_dump to master_thread_id() slave_server(), pos(, )
--10T12::.658797Z [Note] Start semi-sync binlog_dump to slave (server_id: ), pos(, )
--10T12::.658989Z [Note] Stop asynchronous binlog_dump to slave (server_id: )
--10T12::.294491Z [Note] While initializing dump thread for slave with UUID <e00ef9f5-6c4b-11e8--080027de0e0e>, found a zombie dump thread with the same UUID. Master is killing the zombie dump thread().
--10T12::.294611Z [Note] Start binlog_dump to master_thread_id() slave_server(), pos(, )
--10T12::.294663Z [Note] Stop asynchronous binlog_dump to slave (server_id: )
--10T12::.694773Z [Note] Start semi-sync binlog_dump to slave (server_id: ), pos(, )
--10T13::.071298Z [Note] Aborted connection to db: 'zlm' user: 'root' host: 'localhost' (Got timeout reading communication packets) my parameter about semi-synchronous replication listed below: root@localhost:mysql3306.sock [zlm]::>show variables like 'rpl%';
+-------------------------------------------+------------+
| Variable_name | Value |
+-------------------------------------------+------------+
| rpl_semi_sync_master_enabled | ON |
| rpl_semi_sync_master_timeout | | -- 10s is the default value,it's the threshold when the master will turn into async mode.
| rpl_semi_sync_master_trace_level | | -- There're 4 different value of it such as 1,16,32(default),64 of debug level.
| rpl_semi_sync_master_wait_for_slave_count | |
| rpl_semi_sync_master_wait_no_slave | ON | -- "ON" is default values,the semi-sync will continue even if the slave remain is less than the value of value of "rpl_semi_sync_master_wait_for_slave_count".
| rpl_semi_sync_master_wait_point | AFTER_SYNC | -- This values is only permitted in 5.7 or above which can guarantee consistency in replication.
| rpl_stop_slave_timeout | | -- This is the maxium and default value which means year(it seems hardly to timeout^^).
+-------------------------------------------+------------+
rows in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> Now i'm gonna to test when the semi-sync mode will turned into async mode: .set the parameter "rpl_semi_sync_master_wait_for_slave_count"= and "rpl_semi_sync_master_wait_no_slave"=OFF
root@localhost:mysql3306.sock [zlm]::>set global rpl_semi_sync_master_wait_for_slave_count=;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [zlm]::>set global rpl_semi_sync_master_wait_no_slave=OFF;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [zlm]::>show variables like 'rpl%';
+-------------------------------------------+------------+
| Variable_name | Value |
+-------------------------------------------+------------+
| rpl_semi_sync_master_enabled | ON |
| rpl_semi_sync_master_timeout | |
| rpl_semi_sync_master_trace_level | |
| rpl_semi_sync_master_wait_for_slave_count | |
| rpl_semi_sync_master_wait_no_slave | OFF |
| rpl_semi_sync_master_wait_point | AFTER_SYNC |
| rpl_stop_slave_timeout | |
+-------------------------------------------+------------+
rows in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> .turn off the io_thread in one of the slave such as slave and check the status of semi-sync mode both slave and master
slave :
root@localhost:mysql3306.sock [(none)]::>stop slave io_thread;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [(none)]::>show status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | OFF | -- As soo as the IO_Thread had been stopped,the semi-sync mode immediately turned into async mode.
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> master:
root@localhost:mysql3306.sock [zlm]::>show status like 'rpl_semi_sync_master_status';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| Rpl_semi_sync_master_status | OFF | -- The value of status changed follow the value on slave.
+-----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> whicn also can be seen in the error log:
--10T13::.870173Z [ERROR] mysqld: Got an error reading communication packets -- Here occured an error.
--10T13::.552523Z [Note] Stop semi-sync binlog_dump to slave (server_id: )
--10T13::.942023Z [Note] Semi-sync replication switched OFF. -- The semi-sync mode was OFF.
--10T13::.942052Z [Note] Aborted connection to db: 'unconnected' user: 'repl' host: 'zlm3' (failed on flush_net()) -- lost connection with slave .
--10T13::.983185Z [Note] Aborted connection to db: 'zlm' user: 'root' host: 'localhost' (Got timeout reading communication packets) .set the parameter "rpl_semi_sync_master_wait_no_slave"=ON on master again.
root@localhost:mysql3306.sock [zlm]::>set global rpl_semi_sync_master_wait_no_slave=ON;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [zlm]::>show status like 'rpl_semi_sync_master_status';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| Rpl_semi_sync_master_status | ON | -- After set "rpl_semi_sync_master_wait_no_slave"=ON,it turned back again with semi-sync mode.
+-----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> slave :
root@localhost:mysql.sock [(none)]::>show status like 'rpl_semi_sync_slave_status';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON | -- slave still can be replicated from master using semi-sync mode.
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql.sock [(none)]::> slave :
root@localhost:mysql3306.sock [(none)]::>show status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | OFF | -- only if IO_Thread is stated,the value cannnot be changed.
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> .continue to insert into test table "semi_sync_test" wait until up to timeout happen.
master:
root@localhost:mysql3306.sock [zlm]::>show status like 'rpl_semi_sync_master_status';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| Rpl_semi_sync_master_status | ON |
+-----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::>insert into semi_sync_test(name) values('bbb');
Query OK, row affected (10.01 sec) -- Notice,the time used is "10.01" secsonds which is matched with the parameter "rpl_semi_sync_master_timeout"=. root@localhost:mysql3306.sock [zlm]::>show status like 'rpl_semi_sync_master_status';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| Rpl_semi_sync_master_status | OFF |
+-----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> The master become using async mode again on account of the limit time of parameter "rpl_semi_sync_master_timeout". error log of master:
--10T13::.983185Z [Note] Aborted connection to db: 'zlm' user: 'root' host: 'localhost' (Got timeout reading communication packets)
--10T14::.321177Z [Note] Aborted connection to db: 'zlm' user: 'root' host: 'localhost' (Got timeout reading communication packets)
--10T14::.367988Z [Warning] Timeout waiting for reply of binlog (file: mysql-bin., pos: ), semi-sync up to file mysql-bin., position .
--10T14::.368027Z [Note] Semi-sync replication switched OFF. -- the error log also has told you about the change. slave :
root@localhost:mysql.sock [(none)]::>show status like 'rpl_semi_sync_slave_status';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON | -- Even though the value is "ON" in slave ,but it still cannot use semi-sync mode duo to master has changed.
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql.sock [(none)]::> slave :
root@localhost:mysql3306.sock [(none)]::>show status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | OFF | -- Slave won't have any change about the value.
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> .In the end,let's start the IO_Thread on slave 2 and see what will happen.
slave1:
root@localhost:mysql3306.sock [(none)]::>start slave;
Query OK, rows affected (0.00 sec) root@localhost:mysql3306.sock [(none)]::>show status like 'rpl%';
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON |
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [(none)]::> slave2:
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| Rpl_semi_sync_slave_status | ON |
+----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql.sock [(none)]::> master:
root@localhost:mysql3306.sock [zlm]::>show status like 'rpl_semi_sync_master_status';
+-----------------------------+-------+
| Variable_name | Value |
+-----------------------------+-------+
| Rpl_semi_sync_master_status | ON |
+-----------------------------+-------+
row in set (0.00 sec) root@localhost:mysql3306.sock [zlm]::> master error log:
--10T14::.905142Z [Note] Aborted connection to db: 'zlm' user: 'root' host: 'localhost' (Got timeout reading communication packets)
--10T14::.140168Z [Note] Start binlog_dump to master_thread_id() slave_server(), pos(, )
--10T14::.438034Z [Note] Start semi-sync binlog_dump to slave (server_id: ), pos(, )
--10T14::.447797Z [Note] Semi-sync replication switched ON at (mysql-bin., ) -- became semi-sync mode eventually.
Summary:
  • there're sevaral restrictions when using semi-synchronous replication:
  • based on MySQL 5.5 or above version.
  • parameter "have_dynamic_loading" must be set as "yes".
  • replication must has been normally worked such as asynchronous mode.
  • merely compatible with default replication channel.
  • take care of the converting condition between semi-sync and async mode due to timeout.
  • in order to keep consistency of replication,increase the value of "rpl_semi_sync_master_timeout" close to an infinite value maybe makeshift.

MySQL 5.7增强半同步测试的更多相关文章

  1. Bullet:MySQL增强半同步参数rpl_semi_sync_master_wait_point值AFTER_SYNC和AFTER_COMMIT的对比实验

    MySQL 5.7.22启用增强半同步复制 MySQL对该参数值的描述 Semisync can wait for slave ACKs at one of two points, AFTER_SYN ...

  2. MySQL 5.7的复制架构,在有异步复制、半同步、增强半同步、MGR等的生产中,该如何选择?

    一.生产环境中: 几种复制场景都有存在的价值.下面分别描述一下: 从成熟度上来选择,推荐:异步复制(GTID+ROW) 从数据安全及更高性能上选择:增强半同步 (在这个结构下也可以把innodb_fl ...

  3. MySQL增强半同步的搭建实验,和一些参数的个人理解

    关于参数理解,已补充实验,可以查看: rpl_semi_sync_master_wait_no_slave 参数研究实验 环境信息 role ip port hostname master 192.1 ...

  4. (MHA+MYSQL-5.7增强半同步)高可用架构设计与实现

           架构使用mysql5.7版本基于GTD增强半同步并行复制配置 reploication 一主两从,使用MHA套件管理整个复制架构,实现故障自动切换高可用        优势:       ...

  5. Mysql的ssl主从复制+半同步主从复制

    Mysql的ssl主从复制+半同步主从复制 准备工作 1.主从服务器时间同步 [root@localhost ~]# crontab -e */30 * * * * /usr/sbin/ntpdate ...

  6. 深入MySQL复制(三):半同步复制

    1.半同步复制 半同步复制官方手册:https://dev.mysql.com/doc/refman/5.7/en/replication-semisync.html 默认情况下,MySQL的复制是异 ...

  7. 搭建MySQL的主从、半同步、主主复制架构

    复制其最终目的是让一台服务器的数据和另外的服务器的数据保持同步,已达到数据冗余或者服务的负载均衡.一台主服务器可以连接多台从服务器,并且从服务器也可以反过来作为主服务器.主从服务器可以位于不同的网络拓 ...

  8. MySQL/MariaDB数据库的半同步复制

      MySQL/MariaDB数据库的半同步复制 作者:尹正杰  版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.MySQL半同步复制概述 1>.MySQL默认的异步复制 默认情况下,M ...

  9. MySQL 5.7 新特性之增强半同步复制

    1. 背景介绍 半同步复制 普通的replication,即mysql的异步复制,依靠mysql二进制日志也即binary log进行数据复制.比如两台机器,一台主机(master),另外一台是从机( ...

随机推荐

  1. 讲解JavaScript两个圆括号、自调用和闭包函数

    一.JavaSript圆括号的使用 先来看一组通过函数声明来定义的函数: 先附代码: 运行结果如下: 这里我们可以看出: Ø  若没有加圆括号,则返回的是这个函数的内容 Ø  若加上圆括号,则返回的是 ...

  2. recommendation baselines

    整理recommendation baseline 的实现代码和方法归类: bpr:  https://github.com/gamboviol/bpr fpmc:  https://github.c ...

  3. Jquery ajax动态更新下拉列表的内容

    $("#book_id").change(function(){ $book_id=$(this).children('option:selected').val(); //ale ...

  4. MyEclipse中关于JRE System Library、Web App Libraries的疑惑

    简要说明一下:其实,这三个都是jar包的存放集合. 1.JRE System Library主要存放J2SE的标准jar,一般不需要调整. 2.Referenced Libraries是存放第三方的j ...

  5. 远程计算机或设备将不接受连接,IE无法上网

    遇到一个奇葩问题,IE浏览器突然不能上网了,但是其他浏览器可以,QQ什么的也都正常,只有IE是出现:远程计算机或设备将不接受连接 这个问题,网上找了很多答案都没用,什么设置WINS,允许远程访问,取消 ...

  6. Jmeter(一)工具的简单介绍(z)

    一.JMeter介绍 Apache JMeter是100%纯JAVA桌面应用程序,被设计为用于测试客户端/服务端结构的软件(例如web应用程序).它可以用来测试静态和动态资源的性能,例如:静态文件,J ...

  7. 优秀的看图工具推荐 —— XnViewMP

    XnViewMP是一款非常棒的完全免费图片浏览器,支持100多种图片格式,XnViewMP还具有浏览器.幻灯片.屏幕捕捉.缩略图制作.批处理转换.十六进制浏览.拖放.通讯录.扫描输入等功能.XnVie ...

  8. Oracle基础操作

    数据库的定义.作用介绍: 什么是数据库? 按照数据结构来组织.存储和管理数据的建立在计算机存储设备上的仓库. 数据库的发展史: 起始于1962年,1968年在IBM出现 数据库在测试过程中的作用: 需 ...

  9. 巧用padding生成正方形DIV

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. 用sql语句实现年龄分段统计

    SELECT CASE WHEN (age >= 10 AND age <= 20) THEN '10-20' WHEN (age >= 21 AND age <= 30) T ...