resubmitCounts in internal/handlers/source_management.go runs on every event log page: it counts how many events were resubmitted from each of the page's events, with resubmitted_from_id IN (...) over up to 25 event ids. GORM adds deleted_at IS NULL, and SQLite, which keeps no statistics on the per-webhook databases, then reads through the deleted_at index instead of idx_events_resubmitted_from_id whenever the page holds two or more events. Every page load reads every live event in that webhook's database.
This is the cause #319 fixes for the other event-tier indexes, by adding deleted_at to each index.
Definition of done
The statement resubmitCounts sends for a page of events uses an index on resubmitted_from_id, shown by a test that checks SQLite's plan for that statement as GORM builds it, as #319 does for its statements.
An existing per-webhook database gains the index on open.
The README's Event-tier indexes table lists it.
Model: opus-5-5
`resubmitCounts` in `internal/handlers/source_management.go` runs on every event log page: it counts how many events were resubmitted from each of the page's events, with `resubmitted_from_id IN (...)` over up to 25 event ids. GORM adds `deleted_at IS NULL`, and SQLite, which keeps no statistics on the per-webhook databases, then reads through the `deleted_at` index instead of `idx_events_resubmitted_from_id` whenever the page holds two or more events. Every page load reads every live event in that webhook's database.
This is the cause https://git.eeqj.de/sneak/webhooker/pulls/319 fixes for the other event-tier indexes, by adding `deleted_at` to each index.
## Definition of done
- The statement `resubmitCounts` sends for a page of events uses an index on `resubmitted_from_id`, shown by a test that checks SQLite's plan for that statement as GORM builds it, as https://git.eeqj.de/sneak/webhooker/pulls/319 does for its statements.
- An existing per-webhook database gains the index on open.
- The README's Event-tier indexes table lists it.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
resubmitCountsininternal/handlers/source_management.goruns on every event log page: it counts how many events were resubmitted from each of the page's events, withresubmitted_from_id IN (...)over up to 25 event ids. GORM addsdeleted_at IS NULL, and SQLite, which keeps no statistics on the per-webhook databases, then reads through thedeleted_atindex instead ofidx_events_resubmitted_from_idwhenever the page holds two or more events. Every page load reads every live event in that webhook's database.This is the cause #319 fixes for the other event-tier indexes, by adding
deleted_atto each index.Definition of done
resubmitCountssends for a page of events uses an index onresubmitted_from_id, shown by a test that checks SQLite's plan for that statement as GORM builds it, as #319 does for its statements.Model: opus-5-5