summaryrefslogtreecommitdiff
path: root/plugin/semisync/semisync_slave_plugin.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-10-12 20:55:01 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-10-12 20:55:01 +0800
commitf8155de07828c4fdbe1e3ec2b7e0915cfa26e462 (patch)
tree0f1ff7d4db0e95f267665506c40a22068fe849c8 /plugin/semisync/semisync_slave_plugin.cc
parentd8724a4538a61ea6f98fb770c951b89bde734f77 (diff)
downloadmariadb-git-f8155de07828c4fdbe1e3ec2b7e0915cfa26e462.tar.gz
Backport BUG#45848 Semisynchronous replication internals are visible in SHOW PROCESSLIST and logs
Semi-sync uses an extra connection from slave to master to send replies, this is a normal client connection, and used a normal SET query to set the reply information on master, which is visible to user and may cause some confusion and complaining. This problem is fixed by using the method of sending reply by using the same connection that is used by master dump thread to send binlog to slave. Since now the semi-sync plugins are integrated with the server code, it is not a problem to use the internal net interfaces to do this. The master dump thread will mark the event requires a reply and wait for the reply when the event just sent is the last event of a transaction and semi-sync status is ON; And the slave will send a reply to master when it received such an event that requires a reply.
Diffstat (limited to 'plugin/semisync/semisync_slave_plugin.cc')
-rw-r--r--plugin/semisync/semisync_slave_plugin.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugin/semisync/semisync_slave_plugin.cc b/plugin/semisync/semisync_slave_plugin.cc
index ffc663c9bdb..40c6ed9838c 100644
--- a/plugin/semisync/semisync_slave_plugin.cc
+++ b/plugin/semisync/semisync_slave_plugin.cc
@@ -45,13 +45,6 @@ int repl_semi_slave_request_dump(Binlog_relay_IO_param *param,
if (!repl_semisync.getSlaveEnabled())
return 0;
- /*
- Create the connection that is used to send slave ACK replies to
- master
- */
- if (repl_semisync.slaveReplyConnect())
- return 1;
-
/* Check if master server has semi-sync plugin installed */
query= "SHOW VARIABLES LIKE 'rpl_semi_sync_master_enabled'";
if (mysql_real_query(mysql, query, strlen(query)) ||
@@ -106,7 +99,8 @@ int repl_semi_slave_queue_event(Binlog_relay_IO_param *param,
uint32 flags)
{
if (rpl_semi_sync_slave_status && semi_sync_need_reply)
- return repl_semisync.slaveReply(param->master_log_name,
+ return repl_semisync.slaveReply(param->mysql,
+ param->master_log_name,
param->master_log_pos);
return 0;
}