increment_counter是否间接操纵lock_version
?
我正在测试并发性,我注意到lock_version
它正在增加。即使,我不是从ActiveRecord::StaleObjectError
.
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html说
"Active Records support optimistic locking if the field lock_version is present."
这是否意味着自动increment_counter
触发救援ActiveRecord::StaleObjectError
?