mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Moved semisync from a plugin to normal server
Part of MDEV-13073 AliSQL Optimize performance of semisync Did the following renames to match other similar variables key_ss_mutex_LOCK_binlog_ > key_LOCK_bing key_ss_cond_COND_binlog_send_ -> key_COND_binlog_send COND_binlog_send_ -> COND_binlog_send LOCK_binlog_ -> LOCK_binlog debian/mariadb-server-10.2.install does not install semisync libs.
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Read semi-sync reply network error");
|
||||
call mtr.add_suppression("Timeout waiting for reply of binlog");
|
||||
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
|
||||
connection slave;
|
||||
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
connection master;
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (1);
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
include/install_semisync.inc
|
||||
connection master;
|
||||
connection slave;
|
||||
connection slave;
|
||||
show global status like "Slave%_running";
|
||||
Variable_name Value
|
||||
Slave_running ON
|
||||
Slaves_running 1
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
Warnings:
|
||||
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
rpl_semi_sync_slave DELETED
|
||||
connection master;
|
||||
show global status like "Slave%_connect%";
|
||||
Variable_name Value
|
||||
Slave_connections 2
|
||||
Slaves_connected 1
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
Warnings:
|
||||
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
rpl_semi_sync_master DELETED
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (2);
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
show status like "Rpl_semi_sync_slave_status";
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status ON
|
||||
connection master;
|
||||
show status like "Rpl_semi_sync_master_status";
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like "Rpl_semi_sync_master_clients";
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 1
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
rpl_semi_sync_master DELETED
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
connection master;
|
||||
create table t2 (a int);
|
||||
drop table t2;
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
connection master;
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (3);
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
@@ -1,4 +1,3 @@
|
||||
--source include/have_semisync.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/have_binlog_format_mixed_or_statement.inc
|
||||
|
@@ -1,4 +1,3 @@
|
||||
source include/have_semisync.inc;
|
||||
source include/not_embedded.inc;
|
||||
source include/have_innodb.inc;
|
||||
source include/master-slave.inc;
|
||||
|
@@ -1,132 +0,0 @@
|
||||
###############################################################################
|
||||
# Bug#17638477 UNINSTALL AND INSTALL SEMI-SYNC PLUGIN CAUSES SLAVES TO BREAK
|
||||
# Problem: Uninstallation of Semi sync plugin should be blocked when it is
|
||||
# in use.
|
||||
# Test case: Uninstallation of semi sync should be allowed
|
||||
# On Master:
|
||||
# 1) When there is no dump thread
|
||||
# 2) When there are no semi sync slaves (i.e., async replication).
|
||||
# On Slave:
|
||||
# 1) When there is no I/O thread
|
||||
# 2) When there are no semi sync enabled I/O thread (i.e.,async replication).
|
||||
###############################################################################
|
||||
|
||||
--source include/have_semisync_plugin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
call mtr.add_suppression("Read semi-sync reply network error");
|
||||
call mtr.add_suppression("Timeout waiting for reply of binlog");
|
||||
|
||||
###############################################################################
|
||||
# Case 1: Uninstallation of semi sync plugins should be allowed when it is
|
||||
# not in use i.e., when asynchronous replication is active.
|
||||
###############################################################################
|
||||
# Step 1.1: Install semi sync master plugin on master
|
||||
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
|
||||
|
||||
# Step 1.2: Install semi sync slave plugin on slave
|
||||
--connection slave
|
||||
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
|
||||
|
||||
# Step 1.3: Uninstallation of semisync plugin on master and slave should be
|
||||
# allowed at this state as there is no semi sync replication enabled between
|
||||
# master and slave.
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
--connection master
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
|
||||
# Step 1.4: Check that replication is working fine at the end of the test case.
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (1);
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
|
||||
###############################################################################
|
||||
# Case 2: Uninstallation of semi sync plugins should be disallowed
|
||||
# when it is in use i.e., when semi sync replication is active
|
||||
###############################################################################
|
||||
# Step 2.1: Install and enable semi sync replication between master and slave
|
||||
--source include/install_semisync.inc
|
||||
|
||||
# Step 2.2: Check that rpl_semi_sync_slave uninstallation on Slave is not
|
||||
# possible at this state
|
||||
--connection slave
|
||||
show global status like "Slave%_running";
|
||||
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 2.3: Check that rpl_semi_sync_master uninstallation on Master is not
|
||||
# possible at this state
|
||||
--connection master
|
||||
|
||||
# The following is to catch errors if the next uninstall plugin would succeed
|
||||
show global status like "Slave%_connect%";
|
||||
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 2.4: Check that replication is working fine at the end of the test case.
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (2);
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
|
||||
# Step 2.5: Make sure rpl_semi_sync_master_status on Master and
|
||||
# rpl_semi_sync_slave_staus on Slave are ON
|
||||
show status like "Rpl_semi_sync_slave_status";
|
||||
|
||||
###############################################################################
|
||||
# Case 3: Uninstallation of semi sync plugin should be disallowed when there
|
||||
# are semi sync slaves even though rpl_semi_sync_master_enabled= OFF;.
|
||||
###############################################################################
|
||||
# Step 3.1: Disable semi sync on master
|
||||
--connection master
|
||||
show status like "Rpl_semi_sync_master_status";
|
||||
|
||||
# Step 3.2: Check that still Rpl_semi_sync_master_clients is 1
|
||||
show status like "Rpl_semi_sync_master_clients";
|
||||
|
||||
# Step 3.3: Since Rpl_semi_sync_master_clients is 1, uninstallation of
|
||||
# rpl_semi_sync_master should be disallowed.
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
###############################################################################
|
||||
# Case 4: Uninstallation of semi sync plugin should be allowed when it is not
|
||||
# in use. Same as Case 1 but this case is to check the case after enabling and
|
||||
# disabling semi sync replication.
|
||||
###############################################################################
|
||||
|
||||
# Step 4.1: Stop IO thread on slave.
|
||||
--connection slave
|
||||
--source include/stop_slave.inc
|
||||
|
||||
# Step 4.2: Disable semi sync on slave.
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
--connection master
|
||||
# Send something to the slave so that the master would notice that nobody's listening.
|
||||
create table t2 (a int); drop table t2;
|
||||
# and wait for plugin to be unloaded automatically
|
||||
let $wait_condition=select count(*) = 0 from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection slave
|
||||
|
||||
# Step 4.3: Start IO thread on slave.
|
||||
--source include/start_slave.inc
|
||||
|
||||
# Step 4.4: Uninstall semi sync plugin, it should be successful now.
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 4.7: Check that replication is working fine at the end of the test case
|
||||
--connection master
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (3);
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
|
||||
# Cleanup
|
||||
source include/rpl_end.inc;
|
@@ -1,4 +1,3 @@
|
||||
source include/have_semisync.inc;
|
||||
source include/not_embedded.inc;
|
||||
source include/have_innodb.inc;
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
--source include/have_semisync.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
call mtr.add_suppression("Timeout waiting for reply of binlog*");
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#
|
||||
# MDEV-4066 semisync_master + temporary tables causes memory leaks
|
||||
#
|
||||
source include/have_semisync.inc;
|
||||
source include/have_binlog_format_row.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
|
Reference in New Issue
Block a user