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. Python基础-继承与派生

    一.继承 继承是一种创建新的类的方式,在python中,新建的类可以继承自一个或者多个父类,原始类称为基类或超类,新建的类称为派生类或子类. python中类的继承分为:单继承和多继承 class P ...

  2. <Android Framework 之路>BootAnimation(2)

    前言 上一篇主要讲解了BootAnimation是从何而来,如何启动,从开机,到SurfaceFlinger服务起来,然后到执行开机动画,如果要深入的看里面的代码,是需要花一定的时间的,我们旨在了解大 ...

  3. Sort函数的用法

    快速排序sort的用法:(适用于int float double char ...) 记得加头文件! 记得加头文件! 记得加头文件! 头文件: #include <algorithm>   ...

  4. 基于容器微服务的PaaS云平台设计(一) 实现容器微服务和持续集成

    版权声明:本文为博主原创文章,欢迎转载,转载请注明作者.原文超链接 ,博主地址:http://www.cnblogs.com/SuperXJ/ 前言:关于什么是容器微服务PaaS和容器微服务PaaS的 ...

  5. 阿里云安装jdk报错gzip: stdin: unexpected end of file

    在阿里云上面安装jdk时候报了这个问题,如下图所示 然后看了下jdk应该是有150多M的,但是阿里云上面的只有1M多,删除 重新下载... tar zxvf jdk 好了

  6. Linux 虚拟机的计划维护

    Azure 定期执行更新,以提高虚拟机的主机基础结构的可靠性.性能及安全性. 此类更新包括修补宿主环境(例如操作系统.虚拟机监控程序以及主机上部署的各种代理)中的软件组件.升级网络组件以及硬件解除授权 ...

  7. 测试mysql性能工具

    mysqlslap mysqlslap可以模拟服务器的负载,并输出计时信息.它包含在MySQL 5.1 的发行包中,应该在MySQL 4.1或者更新的版本中都可以使用.测试时可以执行并发连接数,并指定 ...

  8. [问题记录]cocos的lua绑定安装pyyaml报错

    描述:按照readme中的文档操作报错,提示python2.7没有安装,但是确实已经安装了,而且也设置环境变量成功了. 解决: 在D盘新建register.py的文件,内容如下: # # script ...

  9. QTimer掉坑出坑过程

    最近遇到一个问题,就是关于QTimer设置了10ms,结果不生效,很头疼啊,查了快一天了,终于知道为什么了? 先说下QTimer的使用方法: m_delayHideTimer这是QTimer的对象. ...

  10. linux和aix内核参数检查

    安装oracle软件时需要设置操作系统级别的用户限制,后期检查可以使用如下命令,方便问题的排查工作 linux: tail -15 /etc/security/limits.conf tail -30 ...