Fix unsound assumption of chunks being disjoint
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 80
- Forks
- 8
- Avg merge
- 21h 44m
- Merged PRs (30d)
- 5
Description
See https://github.com/ilan-gold/zarrs-python/pull/87#discussion_r1966169606
I assume we could still do things in parallel if we want.
We could create a DisjointViews (or so) struct that holds non-overlapping ArrayBytesFixedDisjointViews and has a safe fn add(&mut self, ...) -> bool that returns if a region was safely added (would not overlap with the already contained regions) or not. Then at runtime,
- create a
Vec<DisjointViews>by first trying to add each view to the firstDisjointViewsobject, then the second, … until each view has been added. - go over the vec and handle each
DisjointViewsobject in parallel.
There could be pathological cases where that doesn’t work well, but in practice, those shouldn’t happen
Contributor guide
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 with the linked pull request discussion and trace the code using ArrayBytesFixedDisjointView and the assumption that chunks are disjoint. Determine how views are grouped before parallel handling; done means overlapping views cannot be processed together while non-overlapping work can still run in parallel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100