Change auto-deletion throttling constants to better scale with server size #23320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MAX_BUDGET
: increase from 50 per minute to 150 per minute, as 50 per minute might be too low to keep up with mastodon.social's 56~96 new posts per minute (though the number of toots to be auto-deleted is probably far lower)PER_THREAD_BUDGET
: increase from 5 to 6 per minute, this is more to give more leeway to small serversMAX_DEFAULT_SIZE
: increase from 2 to 200 items, as larger servers will have larger queues (while still quickly chewing through them), a limit of 2 items is not reasonable, as a server with any medium activity will often have more than thatMAX_PUSH_SIZE
: increase from 5 to 500 items, as larger servers will have larger queues (while still quickly chewing through them), a limit of 5 items is not reasonable, as a server with any medium activity will often have more than thatMAX_PULL_SIZE
: increase from 500 to 10000 items since larger servers will frequently queue very large amounts of low-priority jobsMAX_RETRY_SIZE
: dropped it as it's widely inconsistent across servers and is not directly indicative of loadAlso changed the lock TTL to 1 day, which is plenty enough since the job itself is expected to finish in seconds, and will check for load.