Building a Linearizable Log on READ COMMITTED Isolation
5 points by eatonphil
5 points by eatonphil
This article has a really nice example of a metastable performance effect:
The trigger in this case was a transient slowdown of transaction processing that led to the increase in the number of SIRead locks, which in turn increased the cost of every other write, turning the transient slowdown into a sustained effect.
I think I’ve done something like this with two tables with a row per shard and an exclusive (FOR NO KEY UPDATE) lock there for writers, but it wasn’t performance critical. I found that the page-based serializable checks had way too many false positives compared to row-based locking. The CAS query here with just one relation and statement is clever and I assume has much better peak throughput!