zarrs / zarrs/zarrs-python

Fix unsound assumption of chunks being disjoint

Open
#89 1 comment 0 reactions 0 assignees View on GitHub

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,

  1. create a Vec<DisjointViews> by first trying to add each view to the first DisjointViews object, then the second, … until each view has been added.
  2. go over the vec and handle each DisjointViews object in parallel.

There could be pathological cases where that doesn’t work well, but in practice, those shouldn’t happen

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.