You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The query to get a random open game to be closed looks something like this:
query := fmt.Sprintf("SELECT gameUUID FROM (SELECT gameUUID FROM games WHERE finished IS NULL ORDER BY created DESC LIMIT 10) TABLESAMPLE RESERVOIR (%d ROWS)", 1)
These random queries are too expensive in terms of CPU, especially as the games table grows. Additionally, this is called very frequently.
It would be better to improve the generator logic to get a list of 100-1000 open games to store in a queue. When the queue is empty, another call to get more games to close is issued to the backend.
The text was updated successfully, but these errors were encountered:
dtest
changed the title
[Generator] Improve logic for getting games to close
[workloads] Improve logic for getting games to close in matchmaking workload
May 8, 2023
dtest
changed the title
[workloads] Improve logic for getting games to close in matchmaking workload
[Workloads] Improve logic for getting games to close in matchmaking workload
May 9, 2023
The query to get a random open game to be closed looks something like this:
These random queries are too expensive in terms of CPU, especially as the
games
table grows. Additionally, this is called very frequently.It would be better to improve the generator logic to get a list of 100-1000 open games to store in a queue. When the queue is empty, another call to get more games to close is issued to the backend.
The text was updated successfully, but these errors were encountered: