Skip to content
Snippets Groups Projects
Commit 495b5492 authored by Ramakrishnan Muthukrishnan's avatar Ramakrishnan Muthukrishnan
Browse files

do the read/write operations from the db should be in a transaction

`redeemVoucher' reads stuff from the db, makes decisions and then
writes to the db. However if there is another client doing a
simultaneous `redeemVoucher' for the same `voucher', then both of them
would redeem the voucher, which is incorrect. The operations should
have exclusive access to the db and this is achieved with
`withExclusiveTransaction`.
parent 392fda8c
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment