|
|
|
|
|
by dgacmu
224 days ago
|
|
Those transfers would be represented as having dependencies on both accounts they touch, and so would be forced to be ordered. Transfer(a, b, $50) And Transfer(b, c, $50) Are conflicting operations. They don't commute because of the possibility that b could overdraft. So the programmer would need to list (a, b) as the dependencies of the first transaction and (b, c) as the second. Doing so would prevent concurrent submission of these transactions from being executed on the fast path. |
|
A temporary table could hold that sort of data in a format that makes sense for rolling back the related transactions and then replying them 'on the slow path' (if order matters).