pleroma/config
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
..
benchmark.exs Use config to control streamer registry 2024-01-20 18:51:20 -05:00
config.exs feat(retention): walk activities incrementally with a persisted cursor 2026-09-02 12:32:09 +04:00
description.exs feat(retention): walk activities incrementally with a persisted cursor 2026-09-02 12:32:09 +04:00
dev.exs Elixir 1.19: Move default configs to the new Logger configuration, again 2026-03-25 19:35:46 +00:00
docker.exs allow custom db port 2022-11-11 12:22:21 -03:00
dokku.exs Switch from the deprecated "use Mix.config" to "import Config" 2021-05-20 14:02:58 -05:00
emoji.txt Load an emoji.txt specific to the test env 2021-02-03 16:40:59 -06:00
prod.exs Elixir 1.19: Move default configs to the new Logger configuration, again 2026-03-25 19:35:46 +00:00
test.exs Elixir 1.19: Disable colors for logging in test env 2026-03-25 19:35:46 +00:00