Displaying 1 result from an estimated 1 matches for "current_cluster".
2006 Nov 04
0
need advice about race condition
There''s a field in my User model that sometimes needs bulk updates:
User.update_all("cluster = #{new_cluster}", "cluster = #
{current_cluster}")
Now, suppose user with id 37 is affected by that particular
update_all and updates his profile:
1. user 37 is read
2. update_all happens and changes 37''s cluster asynchronously
3. user 37 is saved
now user 37 belongs to the wrong cluster. Unlikely but possible. Is
t...