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?
Deze oefening maakt deel uit van de cursus
Using Data Stores in AWS
Praktische interactieve oefening
Zet theorie om in actie met een van onze interactieve oefeningen.
Begin met trainen