3 ms·
The writeup mentions that concurrent attempts to update a row will be discussed in a future post. The simplified discussion here says that a writer who encounte
by ruggeri 11y ago
The writeup mentions that concurrent attempts to update a row will be discussed in a future post. The simplified discussion here says that a writer who encounters a write intent of an uncommitted transaction aborts the concurrent transaction.
I believe also that non-repeatable reads would be a potential problem. A transaction could read a row, then read it a second time; if a concurrent, committed transaction mutated the row, the repeated read will return a different result.
I believe that both these problems would be solved by MVCC which I suspect is the next blog post.
But I'm not super great at distributed DB stuff, so please correct me if I've misunderstood!
- mrtracy 11y agoPost Author here! Your understanding of this particular issue is correct: the system described in this post would not be able to provide repeatable reads. However, as you've alluded to, Cockroach transactions use a form of snapshot isolation (implemented with MVCC) which does provide repeatable reads. And yes, that will be the subject of my next post. :)