This project is archived and is in readonly mode.
ActiveRecord::find_in_batches should take option[:order]
-
CancelProfileIsBroken
-1
AR::find_in_batches requires the table to be sorted in PK order because of the way it does the find. We shouldn't drop the warning unless you have a reimplementation that makes it possible to find in batches of arbitrary order.
-
Ryan Angilly
-1
If, for example, you order by 'Name', and then while batch processing you insert a new record with the name "Angilly", it is possible (probable actually) that your batch processing will miss records. ID's are not very likely to change, and the auto-incrementing means it's much more difficult to miss records. This is also the reason that it requires integer ID's (and not UUIDs).
Cheers, Ryan
-
blj
Mike, Ryan,
Thanks. I see the problem. I will -1 it myself now :)
-
CancelProfileIsBroken
- State changed from new to wontfix
