Repository navigation
feat(database): add sessions.gc reaper on jobs Engine - #3342
adlerhurst wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
🦋 Changeset detectedLatest commit: f858f13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
aa69756 to
d3b8646
Compare
ee69bc6 to
07f004e
Compare
07f004e to
b50df82
Compare
3b3aaf9 to
314e81a
Compare
314e81a to
d32791a
Compare
d32791a to
efb761d
Compare
efb761d to
98206ad
Compare
426170c to
860243f
Compare
fforootd
left a comment
There was a problem hiding this comment.
Four findings inline: refresh grants left behind, a missing index, the reaper's throughput, and a boot failure mode. Stack overview on #3335.
Generated by Claude Code
f858f13 to
22ad7f2
Compare
9907b6d to
b783bf0
Compare
Periodic sessions.gc with filter DeleteSessions, session.expired Path B event, console EVENT_TYPES, and deleted-count logging. Co-authored-by: s2s4gq4jby <s2s4gq4jby@privaterelay.appleid.com>
Clear refresh grants with each reaped session, index expires_at for the filter/sort, drain batches until a short page, and soft-fail SetPeriodic at boot so a sweeper schedule write cannot stop sign-in. Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
Co-authored-by: Silvan <adlerhurst@users.noreply.github.com>
b783bf0 to
e0ed8e5
Compare
TL;DR
5 of 6 (bases on #3341). First product handler: periodic
sessions.gcdrains expired sessions in batches, clears refresh grants, emits Path Bsession.expired, indexesexpires_at.Reviewer map
apps/api/internal/service/sessions_gc.go(+ tests)session.expiredDeleteSessions+ stmttestexpires_atindex migrations (sqlite 056/postgres 069/spanner 074)SetPeriodicReview follow-ups
DeleteRefreshGrantsBySessionIDper reaped session (same tx as delete/emit).deleted < limit(or ctx done).Stack
… → #3341 ← this → #3343.