Skip to content

Don't try to update aborted judgings #2844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions webapp/src/Controller/API/JudgehostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,12 @@ private function addSingleJudgingRun(
// Only update if the current result is different from what we had before.
// This should only happen when the old result was NULL.
if ($oldResult !== $result) {
if ($oldResult === 'aborted') {
// This judging was cancelled while we worked on it,
// probably as part of a cancelled rejudging.
// Throw away our work, and return that we're done.
return false;
}
if ($oldResult !== null) {
throw new BadMethodCallException('internal bug: the evaluated result changed during judging');
}
Expand Down
Loading