-
Notifications
You must be signed in to change notification settings - Fork 260
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
Balloon list may have problem on awarding the "first to solve" #2810
Comments
…dged submission. The 'first for problem' is already working correctly as it re-uses the corresponding scoreboard data. Fixes DOMjudge#2810.
We had some more discussion about this. The attached PR doesn't fix the problems for first in contest and it is kinda hard to fix (also should be generalized in award service). Also for first in problem, after the PR, we would not display "first in problem" until we are sure that it actually is the "first in problem", but display the balloon without it. So someone could deliver the balloon without realizing it actually could be or is the first in problem. One option would be to hold back the balloon until the info is known (which could be a long time assuming that a compiler/language could be broken) and confusing even when it's not a long time. So no perfect solution. The question is whether we really should fix it or just remove the feature as it is hard to get it right. I went and did some code archaeology, and found that the feature was added as part of a CCS requirement which no longer exists, see #70 I am leaning towards removing first in contest and first in problem on the balloon page. If people would want that functionality, they could use the balloon printer in ICPC tools. |
But I should appologize first that I misunderstanding the logic of "first for problem". |
See this snippet:
Basically, the problem is either we make the info mutable (as in add "first in problem" once we are sure it is first) or hold the balloon back which is confusing and also not great (and would require to hold back all other balloons for the same problem even the ones which cannot be first to solve in problem). |
So you means that it maybe a case that a balloon is 'first for problem' but we don't sure so we don't show this award on the balloon list? But we can find that there are two cases:
But whatever the case is, for this truely 'first for problem' submission, we update scoreboad before insert the balloon, so in balloon list we can immedately see 'first for problem'. |
Ok, I'm sorry that I forgot another case. If early incorrect submission judge finished later than this truely first for problem submissuon, then the scoreboard will decide first for problem later than the balloon insert.
Maybe we should change the logic of balloon insert. After a judge X for problem A finished as correct, we should query if there are some submission earlyer than this one but not finish the judge. If such submission exist, we skip the insert process, otherwise, we can process those submissions (for problem A, submit time <= X.submit time) to insert many balloons. |
Description of the problem
I'm intersted in the logic of balloon.
I found that when the submission judged as Accepted, the balloon will be created immediately.
domjudge/webapp/src/Controller/API/JudgehostController.php
Line 1078 in 7c890e8
But if we have two submission on the same problem (they are the eariliest submissions of the problem) , maybe we call them A and B, and the submit time of A is earlier than B, and A's judge finish time is later, the balloon of submission A will be created after submission B. But when we looking at the balloon list, we temporally found that the balloon of submission B is remindered as the first balloon.
domjudge/webapp/src/Service/BalloonService.php
Line 92 in 7c890e8
In the collectBalloonTable function, we can see that award is determined by the balloon list
The above is my understanding of the balloon logic.
I don't know whether my worry is right or not. If it is, I think it is a bug or if you can tell me how can I temporaly solve this problem (maybe we should send balloons only if there submit time is much earlier than now to avaid eariler submission is not judged yet ?)
Your environment
Steps to reproduce
Create a problem with a long time limit.
Team A submit a code correct but run very slow first.
Team B submit a code correct and run fast later.
Expected behaviour
It's obvious Team A is the first to solve.
Actual behaviour
When Team B's submission is judged as correct but Team A's submission is still judging, we can found the balloon list maked Team B is the first to solve the problem.
Any other information that you want to share?
Sorry that currently I have no machine to test it. But according to my understing, I think this bug truely happens.
The text was updated successfully, but these errors were encountered: