Preventing race conditions with conditions
Two processes are trying to update the same user's email address simultaneously:
- Process A: Changes email from '[email protected]' to '[email protected]'
- Process B: Changes email from '[email protected]' to '[email protected]'
Both use updateitem() with ConditionExpression='email = :oldemail' where :old_email = '[email protected]'. Process A executes first and succeeds.
What happens when Process B executes immediately after?
Latihan ini merupakan bagian dari kursus
Using Data Stores in AWS
Latihan interaktif langsung
Ubah teori menjadi aksi dengan salah satu latihan interaktif kami
Mulai latihan