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`th-downstream
parent
365f875f57
commit
4f2eb43d8a
@ -0,0 +1,6 @@
|
|||||||
|
class AddLockVersionToPolls < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
add_column :polls, :lock_version, :integer, null: false, default: 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in new issue