Skip to content

Add optimistic lock to avoid race conditions when handling votes#10196

Merged
Gargron merged 2 commits intomastodon:masterfrom
ClearlyClaire:fixes/poll-vote-race-condition
Mar 6, 2019
Merged

Add optimistic lock to avoid race conditions when handling votes#10196
Gargron merged 2 commits intomastodon:masterfrom
ClearlyClaire:fixes/poll-vote-race-condition

Conversation

@ClearlyClaire
Copy link
Copy Markdown
Contributor

I'm not sure this is the most efficient solution to this issue, but it should work…

Comment thread app/models/poll_vote.rb
@Gargron Gargron merged commit 96f905f into mastodon:master Mar 6, 2019
@ClearlyClaire ClearlyClaire deleted the fixes/poll-vote-race-condition branch March 14, 2019 13:13
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
…todon#10196)

* Add optimistic lock to avoid race conditions when handling votes

* Force-reload polls when getting `ActiveRecord::StaleObjectError`
messenjahofchrist pushed a commit to Origin-Creative/mastodon that referenced this pull request Jul 30, 2021
…todon#10196)

* Add optimistic lock to avoid race conditions when handling votes

* Force-reload polls when getting `ActiveRecord::StaleObjectError`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants