Commit graph

10 commits

Author SHA1 Message Date
He Zhenxing
0e93befd36 Postfix of previews commit, add missing file
plugin/semisync/CMakeLists.txt:
  Add CMakeLists.txt for semisync
2009-10-23 15:22:20 +08:00
He Zhenxing
e9acb9f021 Add semi-sync support for Windows
CMakeLists.txt:
  Add plugin/semisync subdirectory
mysql-test/mysql-test-run.pl:
  Check for semisync dll for Windows
mysql-test/suite/rpl/r/rpl_semi_sync.result:
  Update result file
mysql-test/suite/rpl/t/rpl_semi_sync.test:
  Test semi-sync on Windows
plugin/semisync/semisync_master.cc:
  Define gettimeofday for Windows
2009-10-23 12:56:30 +08:00
He Zhenxing
d8dee8cb32 Postfix of bug#45674
rpl_semi_sync_master_wait_sessions was reset by FLUSH STATUS,
which could cause the master fail to wake up waiting sessions and
result in master timeout waiting for slave reply.

rpl_semi_sync_master_wait_session should not be reset, this 
problem is fixed by this patch.


plugin/semisync/semisync_master_plugin.cc:
  Change wait_sessions from SHOW_LONG back to SHOW_FUNC so that it will not be reset by FLUSH STATUS.
2009-10-18 20:29:03 +08:00
He Zhenxing
48e98026e2 Backport post fix for semisync
Remove functions that no longer needed
Fix warning suppressions

mysql-test/suite/rpl/t/rpl_semi_sync.test:
  Fix warning suppressions
plugin/semisync/semisync_slave.cc:
  Remove functions that no longer needed
plugin/semisync/semisync_slave.h:
  Remove functions that no longer needed
2009-10-12 21:21:13 +08:00
He Zhenxing
1a7c7a4066 Backport BUG#47298 Semisync: always wait until timeout if no semi-sync slave available
Add an option to control whether the master should keep waiting
until timeout when it detected that there is no semi-sync slave
available.

The bool option 'rpl_semi_sync_master_wait_no_slave' is 1 by
defalt, and will keep waiting until timeout. When set to 0, the
master will switch to asynchronous replication immediately when
no semi-sync slave is available.
2009-10-12 21:15:32 +08:00
He Zhenxing
26b47d9347 BUG#45674 FLUSH STATUS does not reset semisynchronous counters
Semi-sync status were not reset by FLUSH STATUS, this was because
all semi-sync status variables are defined as SHOW_FUNC and FLUSH
STATUS could only reset SHOW_LONG type variables.

This problem is fixed by change all status variables that should
be reset by FLUSH STATUS from SHOW_FUNC to SHOW_LONG.

After the fix, the following status variables will be reset by
FLUSH STATUS:
  Rpl_semi_sync_master_yes_tx
  Rpl_semi_sync_master_no_tx

Note: normally, FLUSH STATUS itself will be written into binlog
and be replicated, so after FLUSH STATS, one of
  Rpl_semi_sync_master_yes_tx
  Rpl_semi_sync_master_no_tx
can be 1 dependent on the semi-sync status. So it's recommended
to use FLUSH NO_WRITE_TO_BINLOG STATUS to avoid this.
2009-10-12 21:03:04 +08:00
He Zhenxing
825dce21b3 Backport Bug#45852 Semisynch: Last_IO_Error: Fatal error: Failed to run 'after_queue_event' hook
Errors when send reply to master should never cause the IO thread
to stop, because master can fall back to async replication if it
does not get reply from slave.

The problem is fixed by deliberately ignoring the return value of
slaveReply.
2009-10-12 20:57:30 +08:00
He Zhenxing
f8155de078 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.
2009-10-12 20:55:01 +08:00
He Zhenxing
d8724a4538 Fix semisync master/slave status always showed as OFF on sparc
On sparc, semisync master/slave status is always showed as OFF, this
is fixed by change rpl_semisync_master/slave_status variables from
long to char.

plugin/semisync/semisync_master.cc:
  Change rpl_semisync_master_status variables from long to char
plugin/semisync/semisync_master.h:
  Change rpl_semisync_master_status variables from long to char
plugin/semisync/semisync_slave.cc:
  Change rpl_semisync_slave_status variables from long to char
plugin/semisync/semisync_slave.h:
  Change rpl_semisync_slave_status variables from long to char
2009-10-03 13:00:05 +08:00
He Zhenxing
623ed58cfd Backporting WL#4398 WL#1720
Backporting BUG#44058 BUG#42244 BUG#45672 BUG#45673
Backporting BUG#45819 BUG#45973 BUG#39012
2009-09-26 12:49:49 +08:00