Skip to content

ContiguousMemmap: single constructor, reset readers on file creation - #361

Open
jrapin wants to merge 1 commit into
sdascoli/bounded-file-handlesfrom
bounded-file-handles-consolidate
Open

jrapin wants to merge 1 commit into
sdascoli/bounded-file-handlesfrom
bounded-file-handles-consolidate

Conversation

@jrapin

@jrapin jrapin commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Builds on #360 (base is its branch): merge into it if agreed.

  • One constructor, ContiguousMemmap(path, offset, shape, dtype): drops wrapping a memmap view (only tests used it), the unused cache parameter, and the negative-stride handling only that path needed.
  • Stale reads: writers reuse data file names (<host>-<thread>.data), so a reader caching a handle on a deleted file returned old data after CacheDict.clear() and a rewrite, also from a new CacheDict. Per-thread reader caches (_get_store) now reset whenever this process creates a shared file; this also covers MemmapArray's cached memmaps (same-instance staleness already on main).
  • Docs: usage and measured trade-off in the class docstring; docs/internal/debug/contiguous-memmap.md is removed (out of sync with the code, excluded from the docs build).

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant