]> cat aescling's git repositories - mastodon.git/commit
Add optimistic lock to avoid race conditions when handling votes (#10196)
authorThibG <thib@sitedethib.com>
Wed, 6 Mar 2019 18:53:57 +0000 (19:53 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 6 Mar 2019 18:53:57 +0000 (19:53 +0100)
commit96f905f40913b915496039d188297a7949b1a6db
tree54111b6c1ee941cd261cf01c630711787b25c1d3
parentb3668a79eca2d185ea57a9ffc2fa012db52e49f0
Add optimistic lock to avoid race conditions when handling votes (#10196)

* Add optimistic lock to avoid race conditions when handling votes

* Force-reload polls when getting `ActiveRecord::StaleObjectError`
app/models/poll.rb
app/models/poll_vote.rb
db/migrate/20190306145741_add_lock_version_to_polls.rb [new file with mode: 0644]
db/schema.rb