Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

nicer handling of insert distinct id failure #527

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

yakkomajuri
Copy link
Contributor

Changes

I did some digging and turns out Postgres errors like 20-40 times per minute trying to insert a distinct ID that already exists. More context on #526

The plugin server handles this properly yet it swallows the errors, while Postgres creates a bit of logspam for what is an expected error for our system. This is similar to #523

Ultimately, this means that on Cloud we're doing tens of thousands of unnecessary queries a day just for distinct ID inserts, but I think any potential solution at this stage might just be over-engineering and would still be prone to race conditons, even if it shortens the window for them to happen.

Anyway, so this just silences unnecessary Postgres errors while making sure the errors we do care about are actually captured in Sentry.

Checklist

  • Updated Settings section in README.md, if settings are affected
  • Jest tests

Copy link
Member

@Twixes Twixes left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@yakkomajuri yakkomajuri added the bump patch Bump patch version when this PR gets merged label Aug 16, 2021
@yakkomajuri yakkomajuri merged commit 1991794 into master Aug 16, 2021
@yakkomajuri yakkomajuri deleted the insert-distinctid branch August 16, 2021 11:39
yakkomajuri added a commit that referenced this pull request Sep 14, 2021
yakkomajuri added a commit that referenced this pull request Sep 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants