▲ | graemep 4 days ago | ||||||||||||||||
I definitely want transactions and rollbacks even if writes happen in sequence. To go with your example, take something like 1) add $100 to this user's account 2) add $100 to the service fees account 3) deduct $101 from the other user's account to cover these Must all happen or none. | |||||||||||||||||
▲ | andersmurphy 4 days ago | parent [-] | ||||||||||||||||
The batch is still atomic (as it's wrapped in a database transaction). So you batch items will never partially happen (say in the case of a crash). You do have to write your batch items so that they check their own constraints though. I.e check the accounts have funds etc. | |||||||||||||||||
|