pleroma/test/pleroma/workers
Lain Soykaf 6c8ed0a3b8
feat(retention): walk activities incrementally with a persisted cursor
Grouping the whole activities table by thread every run is unusable on
a large instance: on a 312 GB database it plans as a seq scan plus a
50M-row on-disk sort. Instead, walk activities in id order (flake ids
are time-ordered) from a persisted cursor up to the id that corresponds
to the deadline, and verify only the threads those activities belong to
through the (type, context) index. Measured on that instance: 147 ms
for a 50k-activity range scan, 349 ms warm / 14 s cold to verify ~700
threads.

The cursor is persisted per chunk so a killed run resumes. The
watermark walk keeps a cursor of its own so it cannot leave the
age-based walk stranded behind the deadline. Adds the retention_cursors
table.
2026-09-02 12:32:09 +04:00
..
cron feat(retention): walk activities incrementally with a persisted cursor 2026-09-02 12:32:09 +04:00
delete_worker_test.exs
poll_worker_test.exs
publisher_worker_test.exs test(workers): replace publisher mocks with Mox 2026-07-24 17:43:02 +04:00
purge_expired_activity_test.exs
purge_expired_filter_test.exs
purge_expired_token_test.exs
reachability_worker_test.exs Tests: Syncify tests that mutate global state. 2026-01-07 17:59:37 +04:00
receiver_worker_test.exs Add failed-signature retry regression tests 2026-05-03 10:19:33 +04:00
remote_fetcher_worker_test.exs Tests: Syncify tests that mutate global state. 2026-01-07 17:59:37 +04:00
scheduled_activity_worker_test.exs
signature_retry_worker_test.exs lint 2026-05-13 00:44:33 +02:00