-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This report comes from @Bash-09. The offending lines are these:
Lines 535 to 545 in d4cd5d3
session_id, old_late_bytes = conn.execute( | |
sa.text( | |
"""SELECT session_id, late_bytes FROM demo_sessions | |
WHERE steam_id = :steam_id | |
AND updated_at = ( | |
SELECT MAX(updated_at) FROM demo_sessions WHERE steam_id = :steam_id | |
); | |
""", | |
), | |
{"steam_id": steam_id}, | |
).one() |
Clients periodically get a 500
during header overwrites because this query returns multiple results, causing one()
to throw an exception.
The easy fix is to use first()
here instead of one()
; still, I think it merits an investigation into why multiple entries of demo_sessions
with identical updated_at
fields exist. More comprehensive changes to the database schema could also make it easier to disambiguate which session the requester last interacted with.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working