cms icon indicating copy to clipboard operation
cms copied to clipboard

IntegrityError when compiling the same code twice in parallel

Open gollux opened this issue 3 years ago • 0 comments

At the IOI, it often happens that during the submission storm at the end of the contest, we are getting errors like this:

WARNING	Worker,46		
File af7ffdbbf9f6ec5d2f3cbbc3c58f980519d89cb8 (Executable insects for compile submission 19699) caused an IntegrityError, ignoring.

I think these are caused by the same source being submitted multiple times, so the same binary is produced, and multiple workers try adding it to the database with the same hash.

It would be nice to handle this more gracefully, either by ignoring the integrity error in this case, or (preferably) by using INSERT ... ON CONFLICT DO NOTHING instead.

gollux avatar Aug 12 '22 11:08 gollux