|
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).
MemPool.jl/src/storage.jl
Line 963 in 8508088
The call to
reverseabove assumesto_deleteis in ascending order, which isn't necessarily the case. I didn't thoroughly test, so I don't know what combinations ofto_memandsra.policycause 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 ifto_memwas 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)withsort(to_delete; rev = true).