JuliaData / JuliaData/MemPool.jl
`deleteat!` fails in `sra_migrate!`
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 25
- Forks
- 16
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 1
Description
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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/storage.jl around line 963 and trace sra_migrate!, especially how to_delete is built and consumed for LRU and MRU policies with different to_mem values. Reproduce the invalid-index deletion, then verify that deletion order remains valid for the affected combinations and that the failure no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 39/100