indico/newdle

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

ThiefMaster opened this issue · 0 comments

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.