Commit 4606deb6 authored by Mario de la Ossa's avatar Mario de la Ossa

Ensure CleanupOptimisticLockingNulls uses BETWEEN

parent 928abf65
...@@ -17,7 +17,7 @@ module Gitlab ...@@ -17,7 +17,7 @@ module Gitlab
(start_id..stop_id).each_slice(QUERY_ITEM_SIZE).each do |range| (start_id..stop_id).each_slice(QUERY_ITEM_SIZE).each do |range|
model model
.where(lock_version: nil) .where(lock_version: nil)
.where(id: range) .where("ID BETWEEN ? AND ?", range.first, range.last)
.update_all(lock_version: 0) .update_all(lock_version: 0)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment