mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-162 Enhanced semisync replication
Implement --semi-sync-master-wait-point=AFTER_SYNC|AFTER_COMMIT. When AFTER_SYNC, the semi-sync wait will be done earlier, before the storage engine commit rather than after. This means that a transaction will not be visible on the master until at least one slave has received it.
This commit is contained in:
committed by
Kristian Nielsen
parent
4d8b346e07
commit
0b87de124d
@@ -32,6 +32,7 @@
|
||||
#include "sql_acl.h" // SUPER_ACL
|
||||
#include "sql_base.h" // free_io_cache
|
||||
#include "discover.h" // extension_based_table_discovery, etc
|
||||
#include "log.h" // for assert_LOCK_log_owner
|
||||
#include "log_event.h" // *_rows_log_event
|
||||
#include "create_options.h"
|
||||
#include "rpl_filter.h"
|
||||
@@ -1479,6 +1480,12 @@ int ha_commit_trans(THD *thd, bool all)
|
||||
|
||||
done:
|
||||
DBUG_EXECUTE_IF("crash_commit_after", DBUG_SUICIDE(););
|
||||
|
||||
/* documentation of which mutexes are (not) owned */
|
||||
mysql_mutex_assert_not_owner(&LOCK_prepare_ordered);
|
||||
assert_LOCK_log_owner(false);
|
||||
mysql_mutex_assert_not_owner(&LOCK_after_binlog_sync);
|
||||
mysql_mutex_assert_not_owner(&LOCK_commit_ordered);
|
||||
RUN_HOOK(transaction, after_commit, (thd, FALSE));
|
||||
goto end;
|
||||
|
||||
|
Reference in New Issue
Block a user