-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Line 963 in 8508088
| foreach(idx->deleteat!(from_refs, idx), reverse(to_delete)) |
The call to reverse above assumes to_delete is in ascending order, which isn't necessarily the case. I didn't thoroughly test, so I don't know what combinations of to_mem and sra.policy cause an error, but I got an error about trying to delete an index that didn't exist when using a LRU policy (don't know if to_mem was true or not). The problem did not occur when I switched to a MRU policy. Sorry I don't have a MWE, though I can reliably reproduce the issue.
My problem went away when I replaced reverse(to_delete) with sort(to_delete; rev = true).