Internal ID: #98
Imported from ISSUES.md via scripts/import-issues.mjs.
Problem Statement. MultiplayerQueueService::processMatchmaking:
const waitingPlayers = await this.queueRepository.find({
where: { status: QueueStatus.WAITING },
order: { createdAt: "ASC" },
});
No index on (status, createdAt) is mentioned in the entity. With 10k queued users, it's a full table scan every 10 seconds.
Expected Outcome.
- Index on
(status, created_at).
- Matchmaking limited to N oldest waiters, e.g. 200.
Acceptance Criteria.
- 10k rows, cron completes in < 200ms.
Files / modules affected.
backend/src/multiplayer-queue/entities/queue.entity.ts
Dependencies. None.
Difficulty / Effort. Medium / S (≈ 3 hours).
Labels. area:backend, performance, priority:high
Problem Statement.
MultiplayerQueueService::processMatchmaking:No index on
(status, createdAt)is mentioned in the entity. With 10k queued users, it's a full table scan every 10 seconds.Expected Outcome.
(status, created_at).Acceptance Criteria.
Files / modules affected.
backend/src/multiplayer-queue/entities/queue.entity.tsDependencies. None.
Difficulty / Effort. Medium / S (≈ 3 hours).
Labels.
area:backend,performance,priority:high