DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
739 stars 259 forks source link

Create judging_run_output together with judging_run #2852

Closed eldering closed 3 days ago

eldering commented 4 days ago

This means that the data state is more consistent.

Also, before the fix https://github.com/DOMjudge/domjudge/commit/bb5d4c840229ef8c04b54cfd58fb620e00b2ea0b, the judgedaemon would retry the API call leading here after a 500 response and then try to recreate the judging_run_output row of the associated judging_run, which was already created in the first API call, leading to an error

[Nov 23 14:47:57.923] judgedaemon[813572]: warning: Error while executing curl POST to url http://localhost/domjudge/api/judgehosts/add-judging-run/tiger-1/2589899: http status code: 500, request size = 5400, response: array (
  'code' => 500,
  'message' => 'An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry \'2575471\' for key \'PRIMARY\'',