Skip to content

Cannot apply rejudging because todo < 0 #2163

Open
@eldering

Description

@eldering

Description of the problem

I've been running a bunch of rejudgings for a contest, and in between I sometimes ran into internal errors, e.g. due to #2162. Now I seem to have gotten in a weird state where I can't apply a (full contest) rejudging after it completed.

Your environment

DOMjudge version 8.0.

Steps to reproduce

Unclear exactly how to reproduce, but it likely involves running a rejudging, then hitting an internal error and then either ignoring or marking as resolved this internal error while the original rejudging was still open.

Actual behaviour

In this state, I found

mysql> SELECT submitid,COUNT(*) AS cnt  FROM judging j WHERE rejudgingid = 80 AND endtime IS NOT NULL GROUP BY 1 HAVING cnt > 1;
+----------+-----+
| submitid | cnt |
+----------+-----+
|     1847 |   2 |
|     1916 |   2 |
|     1934 |   2 |
|     2022 |   2 |
+----------+-----+
4 rows in set (0.01 sec)

which means that due to the duplicate judgings attached to this rejudging for 4 submissions, at https://github.com/DOMjudge/domjudge/blob/main/webapp/src/Service/RejudgingService.php#L406 $done becomes negative, hence the "apply" button won't show up.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions