Open rnewman opened 6 years ago
I thought about this at one point, and concluded that the best way to implement this was a post checker that verifies the CAS conditions after doing the searches against existing data, but before committing the transaction.
Aye, that's feasible. But it does mean introducing some error state in InProgress
— if the transaction aborts then we need to get back up the stack and block the InProgress
, not just the SQL transaction.
https://docs.datomic.com/on-prem/transactions.html#dbfn-cas