chuckya/lib/mastodon
Claire 526332c545
Fix account deletion sometimes failing because of optimistic locks (#16317)
* Fix account deletion sometimes failing because of optimistic locks

In some rare occasions[1], deleting accounts would fail with a
`StaleObjectError` exception.

Indeed, account deletion manually sets the `AccountStat` values without
handling cases where the optimistic locking on `AccountStat` would fail.

To my knowledge, with the rewrite of account counters in #15913, the
`DeleteAccountService` is now the only place that changes the counters in
a way that is not atomic.

Since in this specific case, we do not care about the previous values of the
account counters, it appears we don't need locking at all for this table
anymore.

[1]: https://discourse.joinmastodon.org/t/account-cant-be-deleted/3602

* Bump MAX_SUPPORTED_VERSION in maintenance script
2021-06-02 17:41:25 +02:00
..
accounts_cli.rb Fix “tootctl accounts unfollow” (#15639) 2021-01-29 18:38:56 +01:00
cache_cli.rb Change tootctl to use inline parallelization instead of Sidekiq (#11776) 2019-09-10 13:48:48 +02:00
cli_helper.rb Fix DB connection pool settings in CLI (#15983) 2021-03-31 17:46:17 +02:00
domains_cli.rb Optimize some regex matching (#15528) 2021-01-22 10:09:08 +01:00
email_domain_blocks_cli.rb Fixed code quality issues (#15541) 2021-01-31 21:26:09 +01:00
emoji_cli.rb tootctl emoji import: case insensitive duplicate check (#15738) 2021-03-24 10:55:16 +01:00
feeds_cli.rb Fix tootctl not allocating enough database connections for main thread (#12097) 2019-10-07 05:05:02 +02:00
ip_blocks_cli.rb Fix tootctl ip_blocks add failing if not given a comment (#15263) 2020-12-02 21:19:41 +01:00
maintenance_cli.rb Fix account deletion sometimes failing because of optimistic locks (#16317) 2021-06-02 17:41:25 +02:00
media_cli.rb Use Rails' index_by where it makes sense (#15542) 2021-01-12 09:27:38 +01:00
migration_helpers.rb Fix older migrations on Ruby 3 (#16174) 2021-05-07 15:56:45 +02:00
premailer_webpack_strategy.rb ASSET_HOST is wrong env variable. Fix to CDN_HOST (#6372) 2018-01-29 01:06:39 +01:00
preview_cards_cli.rb Change tootctl to use inline parallelization instead of Sidekiq (#11776) 2019-09-10 13:48:48 +02:00
redis_config.rb Add a Redis environment variable for sidekiq (#16188) 2021-05-09 10:40:17 +02:00
search_cli.rb Fix tootctl search deploy on Ruby 3 (#16346) 2021-06-01 17:31:49 +02:00
settings_cli.rb Admission-based registrations mode (#10250) 2019-03-14 05:28:30 +01:00
snowflake.rb Fixes/do not override timestamps (#7336) 2018-05-03 23:02:46 +02:00
statuses_cli.rb Add --skip-media-remove option to tootctl statuses remove (#13080) 2020-03-08 16:01:07 +01:00
upgrade_cli.rb Fix tootctl upgrade storage-schema S3 ACL (#13768) 2020-05-17 17:27:36 +02:00
version.rb Bump version to 3.4.0 (#16239) 2021-05-16 23:55:07 +02:00