We sometimes encounter situations such as T198156: Server-side deletion of User:LorenzoMilano/sandbox that could be solved, according to @jcrespo and @Marostegui if deletions happened in batches of revisions. It'd also help reduce or suppress db lag once the deletion is complete. Thank you.
Batches implies multiple transactions and wait for slaves- which breaks the ability to quickly revert. This means that atomicity would have to be implemented on application side, or change the model of deletion completely, as suggested on T20493.
When attempting to delete or undelete a page with many revisions, the operation fails with an exception of type "Wikimedia\Rdbms\DBTransactionSizeError".
See also:
- T239095: Undeleting pages with many revision results in DB exceptions (undeleting pages with many revisions)
- T425893: MediaWiki is incapable of deleting files with too many versions (deleting files with many revisions)
- T335589: DBQueryError or DBTransactionSizeError when undeleting files (undeleting files with many revisions)