From 50e192a04f1e0d6cbc98d5935e775e619b0fbff1 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 3 Aug 2014 12:45:14 +0200 Subject: Bug#17638477 UNINSTALL AND INSTALL SEMI-SYNC PLUGIN CAUSES SLAVES TO BREAK Fix the bug properly (plugin cannot be unloaded as long as it's locked). Enable and fix the test case. Significantly reduce number of LOCK_plugin locks for semisync (practically all locks were removed) --- sql/replication.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sql/replication.h') diff --git a/sql/replication.h b/sql/replication.h index 8027c4830ec..9492c54fabd 100644 --- a/sql/replication.h +++ b/sql/replication.h @@ -16,6 +16,20 @@ #ifndef REPLICATION_H #define REPLICATION_H +/*************************************************************************** + NOTE: plugin locking. + This API was created specifically for the semisync plugin and its locking + logic is also matches semisync plugin usage pattern. In particular, a plugin + is locked on Binlog_transmit_observer::transmit_start and is unlocked after + Binlog_transmit_observer::transmit_stop. All other master observable events + happen between these two and don't lock the plugin at all. This works well + for the semisync_master plugin. + + Also a plugin is locked on Binlog_relay_IO_observer::thread_start + and unlocked after Binlog_relay_IO_observer::thread_stop. This works well for + the semisync_slave plugin. +***************************************************************************/ + #include typedef struct st_mysql MYSQL; -- cgit v1.2.1