Schema Upgrades in Galera Cluster
Database schema definition is not supposed to change, at least not so often. The problem with MySQL schema changes is that they are not transactional, and this sets some constraints for how replication of schema changes must be performed. In synchronous database clusters the problem of schema changes is amplified. All cluster nodes are working on same view of data. Schema changes can be very long term (several hours, e.g. for ALTER TABLE), and changed schema definition should be enforced in all cluster nodes at same time, and still allow concurrent transactions on the affected tables. Galera Cluster 4 has new DDL replication implementation, called non blocking DDL, which removes the replication layer locking for DDL replication. How does this play together with MySQL online DDL, will schema upgrades in cluster be totally non blocking? The presentation discusses the non blocking DDL method in very detail, and outlines also the best practices for schema upgrades strategies in database clusters, in general.
Database replication specialist, with long track record of developing various replication and clustering solutions for MySQL and PostgreSQL databases. Currently holding CEO position at Codership, working for Galera open source project with the target of developing a universally applicable synchronous multi-master replication solution.