You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nyastodon/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
3 years ago
..
.gitkeep
20180813113448_copy_status_stats_cleanup.rb
20181116184611_copy_account_stats_cleanup.rb
20190511152737_remove_suspended_silenced_account_fields.rb
20190519130537_remove_boosts_widening_audience.rb
20190706233204_drop_stream_entries.rb
20190715031050_drop_subscriptions.rb
20190901040524_remove_score_from_tags.rb Change trending hashtags to not disappear instantly after midnight (#11712) 5 years ago
20190927124642_remove_invalid_web_push_subscription.rb Validate Web::PushSubscription (#11971) 5 years ago
20200917193528_migrate_notifications_type.rb Add option to be notified when a followed user posts (#13546) 4 years ago
20200917222734_remove_index_notifications_on_account_activity.rb Add option to be notified when a followed user posts (#13546) 4 years ago
20201017234926_fill_account_suspension_origin.rb Add support for reversible suspensions through ActivityPub (#14989) 4 years ago
20210308133107_remove_subscription_expires_at_from_accounts.rb Remove subscription_expires_at leftover from OStatus (#15857) 3 years ago
20210502233513_drop_account_tag_stats.rb Change trending hashtags to be affected be reblogs (#16164) 3 years ago
20210507001928_remove_hub_url_from_accounts.rb Remove PubSubHubbub-related columns from accounts table (#16170) 3 years ago
20210526193025_remove_lock_version_from_account_stats.rb Fix account deletion sometimes failing because of optimistic locks (#16317) 3 years ago