Repository navigation
Make retention delete fast and show progress - #108
Merged
Merged
Conversation
A first sweep over a large backlog appeared to hang: delete_session made about five sequential R2 round trips per session, so deleting 134 sessions meant ~670 calls held open behind one request with nothing on screen. Measured against the bucket, 100 objects one at a time took 24.5s; the same 100 in bulk take 0.9s. - storage.keys_under lists once from the shared root; delete_keys removes exactly those keys in batches of 1000, reporting progress per batch - sweep uses them instead of per-session deletes, and skips tombstones: they exist to stop auto_precompute re-downloading a removed session, and it only looks at the last 7 days, which retention never touches - the sweep now runs in the background via start_sweep, with GET /api/storage/retention/status for progress, so the request no longer blocks and a refresh mid-delete doesn't lose it - the panel polls that status and shows a progress bar over files deleted - the retention controls stay hidden until usage has loaded, so a threshold can't be set against a total that hasn't arrived Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A first sweep over a large backlog appeared to hang: delete_session made about five sequential R2 round trips per session, so deleting 134 sessions meant ~670 calls held open behind one request with nothing on screen. Measured against the bucket, 100 objects one at a time took 24.5s; the same 100 in bulk take 0.9s.