fix(db): add small batch budgets for reclaim cleanups#2735
Conversation
Let SQL Editor reclaim iteratively with tiny per-call limits instead of timing out on one large cleanup_queue_messages/audit/manifest run. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|



Summary (AI generated)
(max_batches, batch_size)args to queue/audit/manifest cleanup functions (defaults keep cron behavior)Motivation (AI generated)
Capgo-EU SQL Editor times out on full reclaim calls. Ops needs to clean part-by-part by re-running small statements.
Business Impact (AI generated)
Unblocks Capgo-EU bloat reclaim without upgrading compute or needing long dashboard timeouts.
Test Plan (AI generated)
bunx vitest run tests/cleanup_swap_memory.test.tsSELECT public.cleanup_queue_messages(1, 500);until notice is 0Generated with AI
Made with Cursor