Competition glitch

Competition glitch
0

#1


Ehm, am only I seeing this, or can everyone?


#2

I can see it too.


#3

Ok, weird I guess I‘m participating twice.


#4

Thanks for pointing this out, ill look into it


#5

Forgot to report back after fixing this yesterday. Before creating a CompetitionEntry, we check if the user already has a CompetitionEntry for the given competition. However, there is a race condition. If two join competition requests are sent at the same time, both checks will occur at very similar times, both checks will succeed (no CompetitionEntry exists, create one), and then two (or more) duplicate entries can be created.

I changed a few of these sort of checks to DB transactions so that can’t happen, and set some unique keys in the database to make it hypothetically impossible to have certain pieces of duplicate data. These improvements are in the pipes and will be live in ~2 weeks.

Also deleted the duplicate