[feat] Prune batch size #653
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#653
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The idea
Have a way of configuring how many posts are deleted when running
mix pleroma.database prune_objects
instead of trying to query and delete every post.Possibly by adding a
LIMIT
to one of the queries like this:Likely have this configurable via a command line option or in
prod.secret.exs
like the post retention limit.The reasoning
When running with
--prune-orphaned-activities
, it can take a long time to prune old remote activities from the database. It also increases the load on the server, causing the instance to run slower and experience delays in receiving remote posts. See: https://meta.akkoma.dev/t/i-am-having-trouble-pruning-my-database/613 for an example.Have you searched for this feature request?
Found that there's two other queries that could have LIMIT added onto them as well. Here's a revised patch that uses a 50k batch size: