samsamsamsmasma
samsamsamsmasma

Reputation: 17

Handling Stale Reads and Lost Updates in Galera Cluster During Large Transactions

I have a question about using Galera Cluster.

I understand that for large transactions (changing many rows), replication between nodes can take a long time. I also know that stale reads can occur in such scenarios.

Due to a stale read, a lost update happened. For example, 1 million rows were changed on Node A, and the transaction was certified between nodes, with only asynchronous replication left. When selecting on Node B, the changes from Node A cannot be read. If I select the changed rows on Node B and update them to different values, the update succeeds. This results in a lost update.

Questions:

I understand that Galera performs certification-based replication. In this case, does the update on Node B not cause a deadlock because the transaction on Node A has been certified and only the act of asynchronous replication is left?

Upvotes: 0

Views: 42

Answers (0)

Related Questions