Skip to content

Missing Index on sessions.hashed_refresh_token #204

@chintakjoshi

Description

@chintakjoshi

Missing Index on sessions.hashed_refresh_token

File: sessions.py:357-371

_fetch_session_by_refresh_hash queries Session.hashed_refresh_token with WITH FOR UPDATE, but there's no visible index on this column. On every token refresh, this becomes a sequential scan against the sessions table, which grows continuously. This will become a performance cliff as the user base scales.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions