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

change create notification to only insert once #1455

Merged
merged 4 commits into from
Dec 3, 2024
Merged

Conversation

terrazoon
Copy link
Contributor

@terrazoon terrazoon commented Dec 3, 2024

Description

We are getting hammered by duplicate insert/integrity errors. Change the logic so notifications can only be inserted once.

NOTE: I tried db.session.merge(notification) and it resulted in hundreds of test failures, unfortunately. So I went with the clunky approach that doesn't break tests.

Security Considerations

N/A

@terrazoon terrazoon changed the title change create notification to an upsert change create notification to only insert once Dec 3, 2024
@terrazoon terrazoon self-assigned this Dec 3, 2024
@terrazoon terrazoon linked an issue Dec 3, 2024 that may be closed by this pull request
@terrazoon terrazoon requested a review from stvnrlly December 3, 2024 22:31
Copy link
Contributor

@ccostino ccostino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @terrazoon!

@ccostino ccostino merged commit cf6fe22 into main Dec 3, 2024
7 checks passed
@ccostino ccostino deleted the notify-api-1454 branch December 3, 2024 22:51
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.

Stop remaining retry/duplicate insert stack traces
3 participants