Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deduplicate order notifications #343

Closed
wants to merge 1 commit into from

Conversation

zzmp
Copy link
Contributor

@zzmp zzmp commented Jan 19, 2024

Disables timestamps from the dynamodb-toolbox ORM, which were causing nop modifications to entities to cause a MODIFY event in the DynamoDB Event Stream, and triggering the Order Notifications Lambda multiple times per order created.

Docs: https://www.dynamodbtoolbox.com/docs#conventions-and-motivations:~:text=Created%20and%20modified%20timestamps%20are%20enabled%20by%20default.

Testing

To reproduce the error, stand up the server and send an order in. Observe in the logs that the Order Notifications Lambda is triggered multiple times, and that the difference in the record for each trigger is only the _md (modified timestamp) of the record.

Tested manually, and verified that order creation now only triggers the Order Notifications Lambda one time.

@zzmp zzmp closed this Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants