|
|
|
|
|
by samrift
2707 days ago
|
|
Not trying to say you can't do it - I'm sure I'm just not informed enough. However, I don't see how MVCC could fix a multi-worker issue that would cause category (1) aborts in your scenario. With MVCC, if another worker concurrently modifies a record ( say 'Y'), I continue to read the pre-modified value once I've read it. So my value for Y may be incorrect between the time I check it's greater than 0, and the time I set X to 42. My constraint check was invalid. At this point you either have a transaction that can't commit despite your guarantee it can (because my conditional passed!) , or an 'eventual consistency' model where the consistency will be reconciled outside the scope of original change (and in this model you wouldn't use 2PC anyway). |
|