chinwagsocial/db/post_migrate
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
..
.gitkeep
20180813113448_copy_status_stats_cleanup.rb Move status counters to separate table, count replies (#8104) 2018-08-14 19:19:32 +02:00
20181116184611_copy_account_stats_cleanup.rb Extract counters from accounts table to account_stats table (#9295) 2018-11-19 00:43:52 +01:00
20190511152737_remove_suspended_silenced_account_fields.rb Record account suspend/silence time and keep track of domain blocks (#10660) 2019-05-14 19:05:02 +02:00
20190519130537_remove_boosts_widening_audience.rb Revert "Remove conversation URI (#11423)" (#11424) 2019-07-28 17:47:37 +02:00
20190706233204_drop_stream_entries.rb Remove Atom feeds and old URLs in the form of GET /:username/updates/:id (#11247) 2019-07-07 16:16:51 +02:00
20190715031050_drop_subscriptions.rb Remove WebSub subscriptions (#11303) 2019-07-21 04:08:00 +02:00
20190901040524_remove_score_from_tags.rb Change trending hashtags to not disappear instantly after midnight (#11712) 2019-09-02 18:11:13 +02:00
20190927124642_remove_invalid_web_push_subscription.rb Validate Web::PushSubscription (#11971) 2019-09-27 15:24:13 +02:00
20200917193528_migrate_notifications_type.rb Add option to be notified when a followed user posts (#13546) 2020-09-18 17:26:45 +02:00
20200917222734_remove_index_notifications_on_account_activity.rb Add option to be notified when a followed user posts (#13546) 2020-09-18 17:26:45 +02:00
20201017234926_fill_account_suspension_origin.rb Add support for reversible suspensions through ActivityPub (#14989) 2020-11-08 00:28:39 +01:00
20210308133107_remove_subscription_expires_at_from_accounts.rb Remove subscription_expires_at leftover from OStatus (#15857) 2021-03-12 05:25:24 +01:00
20210502233513_drop_account_tag_stats.rb Change trending hashtags to be affected be reblogs (#16164) 2021-05-07 14:33:43 +02:00
20210507001928_remove_hub_url_from_accounts.rb Remove PubSubHubbub-related columns from accounts table (#16170) 2021-05-07 19:32:58 +02:00
20210526193025_remove_lock_version_from_account_stats.rb Fix account deletion sometimes failing because of optimistic locks (#16317) 2021-06-02 17:41:25 +02:00