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

Should POST to datapoint (no upserts) throw errors on concurrent modification #56

Open
s4ke opened this issue Sep 26, 2023 · 1 comment

Comments

@s4ke
Copy link
Member

s4ke commented Sep 26, 2023

Currently, the last POST silently wins when two start at a time where no entry exists because we are simply using the standard upsert logic. While this is good for most cases, this might be surprising in some situations.

Instead, we could simply remove the ON CONFLICT logic when doing a regular POST.

@s4ke
Copy link
Member Author

s4ke commented Sep 26, 2023

We can handle such a race condition that was not handled by the validation logic by returning a HTTP 409 conflict.

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

No branches or pull requests

1 participant