You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two http requests come to track donation simultaneously it can start 2 lambda functions in parallel. Then we'll have a race condition in updating fund total - both lambdas will read the current fund total, then add a sum and then write. This can lead to one write overriding the other. We need to resolve that with DynamoDB conditional writes.
We could have used sqs to publish event there and then process them one by one, but that will require to have SQS. If we're still OK and within the processing time limit from Monobank to perform conditional write, then that could be easier to implement.
The text was updated successfully, but these errors were encountered:
If two http requests come to track donation simultaneously it can start 2 lambda functions in parallel. Then we'll have a race condition in updating fund total - both lambdas will read the current fund total, then add a sum and then write. This can lead to one write overriding the other. We need to resolve that with DynamoDB conditional writes.
We could have used sqs to publish event there and then process them one by one, but that will require to have SQS. If we're still OK and within the processing time limit from Monobank to perform conditional write, then that could be easier to implement.
The text was updated successfully, but these errors were encountered: