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
{{ message }}
Repository navigation
Commit 2f84984
Browse filesBrowse the repository at this point in the historyBrowse files
perf(auth): stop blocking requests on best-effort last-used timestamp writes
The API key lastUsed update and the desktop device lastSeenAt update are
display-only, but every request awaited them. When the primary's commits wait
on synchronous replication, these single-row writes stall for the whole
episode and hold the authenticated request (and the desktop inbox poll) with
them. Concurrent requests on the same key also queued behind the stalled
writer's row lock, each holding a pool connection.
Both writes are now fire-and-forget with logged failures, following the
sandbox image touch precedent. The API key write is additionally debounced
per process with an LRU keyed by key id over the existing staleness window,
so a hot key issues at most one in-flight write per process instead of one
per request.
0 commit comments