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.
mastodon/app/models
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
4 years ago
..
account_suggestions Change auto-following admin-selected accounts, show in recommendations (#16078) 4 years ago
admin Add management of delivery availability in Federation settings (#15771) 4 years ago
concerns Fix account deletion sometimes failing because of optimistic locks (#16317) 4 years ago
form Change auto-following admin-selected accounts, show in recommendations (#16078) 4 years ago
web Add `policy` param to `POST /api/v1/push/subscriptions` (#16040) 4 years ago
account.rb Remove PubSubHubbub-related columns from accounts table (#16170) 4 years ago
account_alias.rb
account_conversation.rb
account_deletion_request.rb
account_domain_block.rb
account_filter.rb
account_identity_proof.rb
account_migration.rb
account_moderation_note.rb
account_note.rb
account_pin.rb
account_stat.rb Fix account deletion sometimes failing because of optimistic locks (#16317) 4 years ago
account_suggestions.rb Change auto-following admin-selected accounts, show in recommendations (#16078) 4 years ago
account_summary.rb Fix FollowRecommendationsScheduler failing because of unpopulated views (#16189) 4 years ago
account_warning.rb
account_warning_preset.rb
admin.rb
announcement.rb
announcement_filter.rb
announcement_mute.rb
announcement_reaction.rb
application_record.rb
backup.rb
block.rb
bookmark.rb
canonical_email_block.rb
context.rb
conversation.rb
conversation_mute.rb
custom_emoji.rb
custom_emoji_category.rb
custom_emoji_filter.rb
custom_filter.rb
device.rb
domain_allow.rb
domain_block.rb
email_domain_block.rb
encrypted_message.rb
export.rb
favourite.rb
featured_tag.rb
feed.rb
follow.rb
follow_recommendation.rb Fix FollowRecommendationsScheduler failing because of unpopulated views (#16189) 4 years ago
follow_recommendation_filter.rb
follow_recommendation_suppression.rb
follow_request.rb
home_feed.rb
identity.rb
import.rb
instance.rb Add management of delivery availability in Federation settings (#15771) 4 years ago
instance_filter.rb Add management of delivery availability in Federation settings (#15771) 4 years ago
invite.rb
invite_filter.rb
ip_block.rb
list.rb
list_account.rb
list_feed.rb
marker.rb
media_attachment.rb Fix media processing getting stuck on too much stdin/stderr (#16136) 4 years ago
mention.rb
message_franking.rb
mute.rb
notification.rb
one_time_key.rb
poll.rb
poll_vote.rb
preview_card.rb
public_feed.rb
relationship_filter.rb
relay.rb
remote_follow.rb
report.rb
report_filter.rb
report_note.rb
rule.rb
scheduled_status.rb
search.rb
session_activation.rb Add Ruby 3.0 support (#16046) 4 years ago
setting.rb
site_upload.rb
status.rb
status_pin.rb
status_stat.rb
system_key.rb
tag.rb Change trending hashtags to be affected be reblogs (#16164) 4 years ago
tag_feed.rb
tag_filter.rb Change trending hashtags to be affected be reblogs (#16164) 4 years ago
tombstone.rb
trending_tags.rb Change trending hashtags to be affected be reblogs (#16164) 4 years ago
unavailable_domain.rb
user.rb Add Ruby 3.0 support (#16046) 4 years ago
user_invite_request.rb
web.rb
webauthn_credential.rb