Competition glitch

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

I can see it too.

Ok, weird I guess Iā€˜m participating twice.

Thanks for pointing this out, ill look into it

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

1 Like