зеркало из https://github.com/github/vitess-gh.git
a3efb4ebd2
When using semi-sync with rpl_semi_sync_master_wait_no_slave=1 and rpl_semi_sync_master_timeout=[effectively infinite], it's necessary to toggle master-side semi-sync at the proper times to prevent slaves from getting stuck (since they have no slaves of their own to ACK). This commit adds a new vttablet flag -enable_semi_sync, which causes the replication-management features of Vitess (e.g. InitShardMaster and various reparent operations) to automatically manage semi-sync settings. With these settings, it becomes (reasonably) safe to reparent away from an unresponsive master, as long as the following can be verified: * All semi-sync slaves have stopped replicating from the old master. * The chosen new master is the farthest ahead in replication. Currently we only allow slaves marked in Vitess terms as "replica" tablets to be semi-sync slaves (i.e. to send ACKs). Vitess slaves marked as "rdonly" will NOT ACK, because they are not eligible to become masters, so we never want them to be the only slave with the latest update. This means when using semi-sync, every shard must have at least 2 live "replica" type tablets (including the master) in order to accept writes. |
||
---|---|---|
.. | ||
mycnf | ||
zkcfg | ||
gomysql.pc.tmpl | ||
init_db.sql | ||
zk-client-dev.json |