Unverified Commit cf61700c authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

refactor(turbo-persistence): encapsulate storage backings

Move mmap/file selection, index storage, raw block reads, caching, checksum handling, and Arc/Rc ownership conversion behind the existing lookup and iterator backing types. Common lookup and iteration algorithms no longer branch on the backing variant.

Compile BlockRef::Mmap out whenever the mmap feature is disabled, using a zero-sized PhantomData marker to retain the backing lifetime. Keep the distinct Arc lookup and Rc iterator ownership paths.

Canary's mmap feature already selects file-backed access for WASI; this layer preserves that general policy rather than reintroducing target-family gates.
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
parent f145b8fa
...@@ -42,13 +42,15 @@ xxhash-rust = { workspace = true } ...@@ -42,13 +42,15 @@ xxhash-rust = { workspace = true }
zstd = { workspace = true } zstd = { workspace = true }
[dev-dependencies] [dev-dependencies]
criterion = { workspace = true }
rand = { workspace = true } rand = { workspace = true }
rayon = { workspace = true }
rstest = { workspace = true } rstest = { workspace = true }
tempfile = { workspace = true } tempfile = { workspace = true }
turbo-tasks-malloc = { workspace = true, features = ["custom_allocator"] } turbo-tasks-malloc = { workspace = true, features = ["custom_allocator"] }
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
criterion = { workspace = true }
rayon = { workspace = true }
[[bin]] [[bin]]
name = "sst_inspect" name = "sst_inspect"
path = "src/bin/sst_inspect.rs" path = "src/bin/sst_inspect.rs"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment