3 ms·
That's not what semi-sync does. Semi-sync commits the write to the master and then blocks on returning a result to the client until N replicas have received a w
by p4lindromica 10y ago
That's not what semi-sync does. Semi-sync commits the write to the master and then blocks on returning a result to the client until N replicas have received a write OR a timeout is reached. There is no ability to roll back the write on the master once it is committed.
- morgo 10y agoThis was the case for 5.5 and 5.6. MySQL 5.7+ will default to wait for the ack before committing locally: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_rpl_semi_sync_master_wait_point https://dev.mysql.com/doc/refman/5.7/en/server-system-variab...
- p4lindromica 10y agoDoes AFTER_SYNC mean MySQL 5.7+ can have unacknowledged writes appear on the slaves after a master crash and failover?
- morgo 10y agoI believe the answer is "yes" but this problem is not unique to semi-sync. Take a single server example: You could ask the database to "COMMIT"; it receives the command and processes it, but does not manage to send you notification that it has managed. There is a further failure state: The master could be behind when it crashed. So you need to look at it's gtid executed set or re-image it before plugging it back in. (Not a distributed systems guy; I work on the non HA+replication parts of the server)