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

Finalize locking mechanism #17

Open
adewes opened this issue Nov 28, 2021 · 1 comment
Open

Finalize locking mechanism #17

adewes opened this issue Nov 28, 2021 · 1 comment
Assignees
Labels
bug Something isn't working prio High-priority issue, implement first!

Comments

@adewes
Copy link
Member

adewes commented Nov 28, 2021

Currently several race conditions are possible in the bookSlot endpoint:

  • The provider could delete the appointment slot the user is about to book during the booking procedure.
  • Another user could book the same appointment slot.

While the likelihood of this happening is negligible for a small number of users it can become larger as the number of concurrent users grows. We should therefore use the Redis WATCH mechanism to ensure that no race conditions occur during the booking process.

@adewes adewes added bug Something isn't working prio High-priority issue, implement first! labels Nov 28, 2021
@johannwagner johannwagner self-assigned this Nov 28, 2021
@adewes adewes self-assigned this Dec 1, 2021
@adewes
Copy link
Member Author

adewes commented Dec 1, 2021

Thanks for implementing this @johannwagner, I'll finalize the locking the coming days.

@adewes adewes changed the title Use WATCH mechanism to preclude race conditions during appointment booking Finalize locking mechanism Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio High-priority issue, implement first!
Projects
None yet
Development

No branches or pull requests

2 participants