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. HighChart利用servlet导出中文PNG图片乱码问题解决

    最近用到HighChart作图,在图片导出时,出现了图片中中文乱码的问题,在网络上找了很多资料,但都没有解决,最后才发现了最容易被忽略的问题.具体见下. 由于之前有同事使用过HighChart,所以毫 ...

  2. Java基础之Map的遍历

    遍历Map集合,有四种方法:   public static void main(String[] args) { Map<String, String> map = new HashMa ...

  3. data-* 自定义数据属性 遇到的坑

    除非data-*自定义数据属性的值是固定不变的,否则最好不要把data-*作为查询条件. 例子: <div data-index="0">hello</div&g ...

  4. urlx

    2015-09-24 23:41:26 centos6.6下安装MongoDB3.0.1 https://www.percona.com/doc/percona-tokumx/installation ...

  5. 沉淀,再出发:Git的再次思考

    沉淀,再出发:Git的再次思考 一.前言 使用git也有很久了,后来有一段时间一直没有机会去使用,现在想来总结一下自己学习了这么长时间的一些心得感悟,我写的博客一般都是开了一个轮廓和框架,等到以后有所 ...

  6. C++默认值。

    类成员变量: char :� //随机int :2685372 //随机string :size:0length:0 vector :0map :0 结构体 //取决于成员自己的类型 类成员静态变量: ...

  7. SAP CRM里Lead通过工作流自动创建Opportunity的原理讲解

    (1) 在SAP CRM里创建一个Lead后,会观察到有一个Opportunity自动生成,这是通过什么后台逻辑实现的呢? 检查前台日志或者后台事务码SLG1,发现有很多属于用户WF-BATCH的日志 ...

  8. 20140322 卡迪夫城VS利物浦,拔出重剑,有惊无险

    一.菱形442 起初在客战南安普顿的时候,罗杰斯启用了菱形442阵式,阵容和今天客战卡迪夫城几乎一样,只是格伦·约翰逊打左后卫,弗拉纳甘任职右后卫,目的是为了在客场抵御卢克·肖+拉拉纳.当时库蒂尼奥的 ...

  9. Webpack笔记(三)——一款破产版脚手架的开发

    前些天一直在学习入门Webpack,后来尝试了自己搭建一下一个简单的React开发环境,后来就在想可不可以自己写一个简单的脚手架,以免每次搭建一个简单的开发环境都需要自己一个个的配置,这样很麻烦,使用 ...

  10. web页面显示当前系统时间并定时刷新

    function showCurrentDate(){ var today,hour,second,minute,year,month,date; var strDate ; today=new Da ...