mysqldatabasemariadbreplicationgalera

Clarification on Galera's Total Order Isolation (TOI) Mode and Write Blocking


I'm currently exploring the Total Order Isolation (TOI) mode in Galera clusters and I'm seeking clarification on how write blocking operates in this mode, particularly in scenarios where multiple databases are hosted on the same server.

From my understanding, TOI mode in Galera clusters is designed to block write operations at the server level when certain data definition language (DDL) operations are performed. However, I'm uncertain about the behavior when multiple databases are hosted on the same server.

Specifically, if a TOI event occurs due to a DDL operation in "Database A", will write operations in "Database B" also be blocked during this time? Or does the write blocking only affect the database where the DDL operation is executed?

I'm also curious about how write-sets are managed in Galera clusters. Specifically, does each server in the cluster manage its own write-set independently, or are write-sets managed at the database level?

Any insights or clarification on this aspect of Galera's behavior would be greatly appreciated. Additionally, if there are any relevant documentation or sources that can provide further information on this topic, I would be grateful for the guidance.

Thank you for your assistance!

Based on what I observed in the process list, it seems that write blocking is happening at the server level. However, I couldn't find any documentation explicitly mentioning this behavior. Does the documentation consider such details regarding whether write blocking occurs at the node or database level?


Solution

  • TOI affects whole of server, from docs "For the duration of the DDL processing, no other transactions can commit.".

    Also from the documentation - pt-online-schema-change in the Percona Toolkit is a good way to do low impact schema changes.