This report comes from @Bash-09. The offending lines are these:
|
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.
This report comes from @Bash-09. The offending lines are these:
masterbase/masterbase/lib.py
Lines 535 to 545 in d4cd5d3
Clients periodically get a
500during header overwrites because this query returns multiple results, causingone()to throw an exception.The easy fix is to use
first()here instead ofone(); still, I think it merits an investigation into why multiple entries ofdemo_sessionswith identicalupdated_atfields exist. More comprehensive changes to the database schema could also make it easier to disambiguate which session the requester last interacted with.