A transfer in one atomic step
A transfer of 50 from account id = 1 to id = 2 in accounts must be atomic: without a single operation the first step goes through, and if the second fails the money is lost. Do the transfer in one atomic statement: debit id = 1 (if it has enough) and credit id = 2 only when the debit succeeded. It must be safe under concurrent transfers.
Kirjaudu sisään nähdäksesi palautushistorian
Kirjaudu sisäänKirjaudu sisään käyttääksesi tekoälymentoria
Kirjaudu sisään