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

Use Guards to Ensure That Only One Request Creates or Deletes an App #39

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

schrieveslaach
Copy link
Contributor

This commit ensures that subsequent DELETE requests of the same app ID wait for the results of the first DELETE request. This makes the DELETE idempotent.

@schrieveslaach schrieveslaach changed the title Use Guard to Ensure That Only One Request Performs a Deletion Use Guards to Ensure That Only One Request Creates or Deletes an App Apr 16, 2020
Copy link
Contributor

@x1B x1B left a comment

Choose a reason for hiding this comment

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

Being a rust noob and this being about concurrency, I am fairly confident that I don't understand most of it ;) looks like a sensible approach though.
I asked some "leading questions" but am otherwise fine with it.

api/src/apps/apps.rs Show resolved Hide resolved
api/src/apps/apps.rs Show resolved Hide resolved
This commit ensures that subsequent DELETE requests of the same app name wait
for the results of the first DELETE request. This makes the DELETE idempotent.
Additionally, it ensures that POST and DELETE requests use the same guard based
on the app name.
@schrieveslaach schrieveslaach merged commit 41e3b05 into master Apr 20, 2020
@schrieveslaach schrieveslaach deleted the bugfix/deletion-guards branch June 8, 2020 09:18
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