forked from DOMjudge/domjudge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing events in the feed due to out of order commits
Events may become available to read by the event-feed API controller out of event_id order because they are (sometimes) created inside a transaction. The old code was only looking for events with ID larger than the last one emitted, which could lead to skipping events. This happened at the WFs in Luxor especially with judging events for a compiler error, as inside a transaction two events are logged and then the scoreboard is recalculated, leaving plenty of time for another event to get logged in the mean time. Fix this by querying for *all* events and making sure that we're not missing any sequential event_ids. If we do wait and retry for one second, and only then skip these. This means that event filtering must now be done in code rather than in the SQL query.
- Loading branch information
Showing
1 changed file
with
70 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters