Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a limit to expunging annotations
Fixes #8494. I don't know if this has been causing us any problems or not but in theory if a large number of annotations have been marked as deleted (for example: maybe a user account that had a lot of annotations has been deleted) the `bulk_delete()` method will try to expunge all of these annotations from the DB at once which could cause a long-running `DELETE` query to hold a lock on the `annotation` table for too long and disrupt the DB service. It seems a no-brainer to just add a fixed limit to this. The method runs periodically so over time it will eventually expunge all deleted annotations but there's no hurry, no need to try to do them all at once.
- Loading branch information