Skip to content

Fix unsound assumption of chunks being disjoint #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
flying-sheep opened this issue Feb 24, 2025 · 1 comment
Open

Fix unsound assumption of chunks being disjoint #89

flying-sheep opened this issue Feb 24, 2025 · 1 comment

Comments

@flying-sheep
Copy link
Collaborator

flying-sheep commented Feb 24, 2025

See #87 (comment)

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

@LDeakin
Copy link
Collaborator

LDeakin commented Feb 24, 2025

That sounds reasonable, but we could just be patient. zarr-python might disallow it zarr-developers/zarr-python#2855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants