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: concurrent client registration errors #341

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented Jun 4, 2024

Description

Fixes race condition where two INSERTs for the same client ID are made due to clients calling this endpoint in rapid succession.

Alternative would be to return a 409 conflict or assume success when INSERT gives a conflict, but this 1) hides potential errors and 2) doesn't live up to the purest form of idempotency.

How Has This Been Tested?

New test

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@chris13524 chris13524 self-assigned this Jun 4, 2024
@arein arein added the accepted The issue has been accepted into the project label Jun 4, 2024
Copy link
Member

@arein arein left a comment

Choose a reason for hiding this comment

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

nice!

@chris13524 chris13524 marked this pull request as ready for review June 4, 2024 15:29
@chris13524 chris13524 changed the title fix: concurrent client creation errors fix: concurrent client registration errors Jun 4, 2024
Copy link
Contributor

@geekbrother geekbrother left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@chris13524 chris13524 merged commit 85b9997 into main Jun 5, 2024
6 checks passed
@chris13524 chris13524 deleted the fix/lock-create-client branch June 5, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue has been accepted into the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants