Skip to content

Release diff: master → previous_release - #17

Open
Th0rgal wants to merge 1 commit into
previous_releasefrom
master
Open

Release diff: master → previous_release#17
Th0rgal wants to merge 1 commit into
previous_releasefrom
master

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Jul 3, 2026

Copy link
Copy Markdown
Member

Automated PR. The 'previous_release' branch is force-updated on every push to master to point at the commit before the push, so this PR always represents the current release diff.


Note

Medium Risk
Changes production data retention behavior under backlog conditions; chunked deletes are safer but cleanup may take longer and still cascade per chunk.

Overview
Batch index TTL cleanup no longer runs as one DELETE ... WHERE received_at < $1. It now deletes up to 10,000 rows per iteration (oldest received_at first) until the backlog is cleared, so a large catch-up after first enable or downtime does not hold one long transaction on batch_index or trigger a massive ON DELETE CASCADE on module_dispatches.

Schema adds idx_batch_index_received_at on batch_index (received_at) for that cleanup path, documented as used by object_store_cleanup.rs.

Reviewed by Cursor Bugbot for commit 4ebf288. Bugbot is set up for automated code reviews on this repo. Configure here.

The cleanup task deleted all expired batch_index rows in a single
statement. With a backlog (first enable, or downtime) that becomes one
giant transaction cascading millions of module_dispatches rows. Delete
in 10k chunks instead, and add an index on received_at so the expiry
scan doesn't seq-scan the table.
@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_35f6ffcb-b2f8-4dba-a661-8a853990d965)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant