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

"Race condition" between opening a newdle, people responding and updating its participants #486

Open
ThiefMaster opened this issue May 14, 2024 · 0 comments

Comments

@ThiefMaster
Copy link
Member

According to a ticket we just got, there's most likely a bug where a participant can be silently lost:

  1. Creator keeps their newdle (summary page) open in the browser
  2. Someone who is not yet a participant responds to the newdle -> new participant is created
  3. Creator edits the newdle's participants (e.g. removing or adding someone)

Most likely any participant that was created between step 1 and 3 is removed by this code.

The best solution would probably be to not actually remove participants from the list when sending the PATCH request but rather setting something like deleted: true, and then only removing participants for which we received that data in the PATCH, and ignoring any participant that's simply not in the list.

Note: I have not tried to reproduce the issue, but it's the only logical explanation and the server logs for the newdle from the ticket don't contradict this.

@ThiefMaster ThiefMaster changed the title Avoid "race condition" between opening a newdle and editing its participants "Race condition" between opening a newdle, people responding and updating its participants May 14, 2024
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