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

turbo-persistence: make batch_get callback-oriented

batch_get now reports each key index to a callback, possibly concurrently,
instead of returning an ordered Vec. The backend decodes TaskStorage inside
the callback, so decoding runs in parallel with the reads for large
batches, and writes the results into its restore entries directly.

This replaces the separate parallel decode step from #100453
(decode_task_storage_batch, PARALLEL_DECODE_THRESHOLD, batch_lookup_raw and
the batch_lookup bench). The batch lookup round-trip test now covers the
callback API on both sides of batch_get's parallel cutoff, including a
malformed value.

<!-- NEXT_JS_LLM -->
Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent a72565ab
...@@ -555,8 +555,11 @@ fn bench_read_batch_get(c: &mut Criterion) { ...@@ -555,8 +555,11 @@ fn bench_read_batch_get(c: &mut Criterion) {
.collect::<Vec<_>>() .collect::<Vec<_>>()
}, },
|keys| { |keys| {
let result = db.batch_get(0, &keys).unwrap(); db.batch_get(0, &keys, |index, value| {
black_box(result) black_box((index, value));
Ok(())
})
.unwrap()
}, },
BatchSize::NumBatches(1), BatchSize::NumBatches(1),
); );
...@@ -585,8 +588,11 @@ fn bench_read_batch_get(c: &mut Criterion) { ...@@ -585,8 +588,11 @@ fn bench_read_batch_get(c: &mut Criterion) {
.collect::<Vec<_>>() .collect::<Vec<_>>()
}, },
|keys| { |keys| {
let result = db.batch_get(0, &keys).unwrap(); db.batch_get(0, &keys, |index, value| {
black_box(result) black_box((index, value));
Ok(())
})
.unwrap()
}, },
BatchSize::NumBatches(1), BatchSize::NumBatches(1),
); );
...@@ -914,11 +920,23 @@ fn bench_family_sharding(c: &mut Criterion) { ...@@ -914,11 +920,23 @@ fn bench_family_sharding(c: &mut Criterion) {
}); });
group.bench_function("batch_get/hit_64", |b| { group.bench_function("batch_get/hit_64", |b| {
let (_, db) = &*db; let (_, db) = &*db;
b.iter(|| black_box(db.batch_get(2, black_box(&batch_hits)).unwrap())) b.iter(|| {
db.batch_get(2, black_box(&batch_hits), |index, value| {
black_box((index, value));
Ok(())
})
.unwrap()
})
}); });
group.bench_function("batch_get/miss_64", |b| { group.bench_function("batch_get/miss_64", |b| {
let (_, db) = &*db; let (_, db) = &*db;
b.iter(|| black_box(db.batch_get(2, black_box(&batch_misses)).unwrap())) b.iter(|| {
db.batch_get(2, black_box(&batch_misses), |index, value| {
black_box((index, value));
Ok(())
})
.unwrap()
})
}); });
group.finish(); group.finish();
} }
......
use std::cell::UnsafeCell;
/// A mutably borrowed slice whose elements can be written from multiple threads, as long as each
/// element is written at most once while the slice is shared.
pub(crate) struct ConcurrentSlice<'l, T> {
data: &'l [UnsafeCell<T>],
}
// SAFETY: Through a shared `ConcurrentSlice`, other threads move `T` values into the slice and drop
// the values they replace, which requires `T: Send`. It never hands out references to elements, so
// it doesn't require `T: Sync`. Callers of `write` guarantee that no element is accessed by two
// threads. Distinct elements are distinct memory locations, so writes from different threads to
// different elements never race or tear, even when `T` is a single byte. This is the same
// guarantee that makes sending the halves of `split_at_mut` to different threads sound.
unsafe impl<T: Send> Send for ConcurrentSlice<'_, T> {}
// SAFETY: See above.
unsafe impl<T: Send> Sync for ConcurrentSlice<'_, T> {}
impl<'l, T> ConcurrentSlice<'l, T> {
pub(crate) fn new(slice: &'l mut [T]) -> Self {
let len = slice.len();
// SAFETY: `UnsafeCell<T>` has the same memory layout as `T` (it is `#[repr(transparent)]`),
// and the pointer comes from a mutable borrow of `len` elements that lasts for `'l`, so no
// other access to the elements exists while `data` is alive.
let data =
unsafe { std::slice::from_raw_parts(slice.as_mut_ptr().cast::<UnsafeCell<T>>(), len) };
Self { data }
}
/// Replaces the element at `index` with `value`, dropping the previous value. Panics if
/// `index` is out of bounds.
///
/// # Safety
///
/// Each `index` must be written at most once while `self` is shared, so no two threads access
/// the same element.
pub(crate) unsafe fn write(&self, index: usize, value: T) {
let cell = &self.data[index];
// SAFETY: The caller guarantees that no other access to this element happens concurrently.
unsafe { *cell.get() = value };
}
}
#[cfg(test)]
mod tests {
use crate::concurrent_slice::ConcurrentSlice;
#[test]
fn writes_from_multiple_threads() {
const LEN: usize = 64;
// The previous values are boxed, so leaking or double-dropping them is detected by Miri.
let mut values: Vec<Option<Box<usize>>> = vec![Some(Box::new(usize::MAX)); LEN];
let writer = ConcurrentSlice::new(&mut values);
std::thread::scope(|scope| {
for thread in 0..4 {
let writer = &writer;
scope.spawn(move || {
for index in (thread..LEN).step_by(4) {
// SAFETY: Each thread writes a distinct residue class of indices.
unsafe { writer.write(index, Some(Box::new(index))) };
}
});
}
});
for (index, value) in values.iter().enumerate() {
assert_eq!(value.as_deref(), Some(&index));
}
}
#[test]
fn writes_adjacent_bytes_from_multiple_threads() {
const LEN: usize = 64;
let mut values = [0u8; LEN];
let writer = ConcurrentSlice::new(&mut values);
std::thread::scope(|scope| {
for thread in 0..4 {
let writer = &writer;
scope.spawn(move || {
// Adjacent bytes are written by different threads.
for index in (thread..LEN).step_by(4) {
// SAFETY: Each thread writes a distinct residue class of indices.
unsafe { writer.write(index, index as u8 + 1) };
}
});
}
});
for (index, &value) in values.iter().enumerate() {
assert_eq!(value, index as u8 + 1);
}
}
#[test]
#[should_panic]
fn write_out_of_bounds_panics() {
let mut values = [0u32; 4];
let writer = ConcurrentSlice::new(&mut values);
// SAFETY: No other write happens.
unsafe { writer.write(4, 1) };
}
}
...@@ -39,7 +39,6 @@ use crate::{ ...@@ -39,7 +39,6 @@ use crate::{
arc_bytes::ArcBytes, arc_bytes::ArcBytes,
compaction::selector::{Compactable, MergeJob, plan_compaction}, compaction::selector::{Compactable, MergeJob, plan_compaction},
compression::{Compression, checksum_block, decompress_into_arc}, compression::{Compression, checksum_block, decompress_into_arc},
concurrent_slice::ConcurrentSlice,
constants::{ constants::{
DATA_THRESHOLD_PER_COMPACTED_FILE, KEY_BLOCK_AVG_SIZE, KEY_BLOCK_CACHE_SIZE, DATA_THRESHOLD_PER_COMPACTED_FILE, KEY_BLOCK_AVG_SIZE, KEY_BLOCK_CACHE_SIZE,
MAX_ENTRIES_PER_COMPACTED_FILE, VALUE_BLOCK_AVG_SIZE, VALUE_BLOCK_CACHE_SIZE, MAX_ENTRIES_PER_COMPACTED_FILE, VALUE_BLOCK_AVG_SIZE, VALUE_BLOCK_CACHE_SIZE,
...@@ -2442,15 +2441,26 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2442,15 +2441,26 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
Ok(output) Ok(output)
} }
/// Looks up many keys of a [`FamilyKind::SingleValue`] family at once. The result has one entry /// Looks up many keys of a [`FamilyKind::SingleValue`] family at once.
/// per key, in the order of `keys`. ///
/// Calls `on_result` with the index of the key in `keys` and its value, or `None` if the key
/// is missing or deleted. When this returns `Ok`, `on_result` was called exactly once for every
/// index, including each occurrence of a duplicate key. The calls happen in no particular order
/// and may run concurrently on other threads.
///
/// If a read fails or `on_result` returns an error, the error is returned. Other calls may have
/// happened by then, and some indices may never be reported.
///
/// `on_result` runs while the database holds an internal read lock, so it must not call back
/// into this database.
/// ///
/// Panics if there are more than `u32::MAX` keys. /// Panics if there are more than `u32::MAX` keys.
pub fn batch_get<K: QueryKey + Sync>( pub fn batch_get<K: QueryKey + Sync>(
&self, &self,
family: usize, family: usize,
keys: &[K], keys: &[K],
) -> Result<Vec<Option<ArcBytes>>> { on_result: impl Fn(usize, Option<ArcBytes>) -> Result<()> + Sync,
) -> Result<()> {
debug_assert!(family < FAMILIES, "Family index out of bounds"); debug_assert!(family < FAMILIES, "Family index out of bounds");
if self.config.family_configs[family].kind != FamilyKind::SingleValue { if self.config.family_configs[family].kind != FamilyKind::SingleValue {
// This is an error in our caller so just panic // This is an error in our caller so just panic
...@@ -2501,15 +2511,14 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2501,15 +2511,14 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
inner.shard_indices[family].bits(), inner.shard_indices[family].bits(),
target_chunk_count, target_chunk_count,
); );
let mut results: Vec<Option<ArcBytes>> = vec![None; keys.len()]; let on_result = &on_result;
let results_writer = ConcurrentSlice::new(&mut results);
let lookup_chunk = |chunk: &mut BatchGetChunk<'_>| { let lookup_chunk = |chunk: &mut BatchGetChunk<'_>| {
self.batch_get_chunk( self.batch_get_chunk(
inner, inner,
family, family,
keys, keys,
chunk, chunk,
&results_writer, on_result,
key_block_cache, key_block_cache,
value_block_cache, value_block_cache,
) )
...@@ -2531,11 +2540,12 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2531,11 +2540,12 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
span.record("result_size", counts.result_size); span.record("result_size", counts.result_size);
#[cfg(feature = "stats")] #[cfg(feature = "stats")]
self.record_batch_get_stats(counts); self.record_batch_get_stats(counts);
Ok(results) Ok(())
} }
/// Looks up the keys of a chunk for [`Self::batch_get`]. Values found (including blobs) are /// Looks up the keys of a chunk for [`Self::batch_get`] and reports each of them to
/// written to `results` at the index of their key. /// `on_result` once: found values (including blobs) as soon as they are read, and missing or
/// deleted keys as `None`.
#[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_arguments)]
fn batch_get_chunk<K: QueryKey>( fn batch_get_chunk<K: QueryKey>(
&self, &self,
...@@ -2543,7 +2553,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2543,7 +2553,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
family: usize, family: usize,
keys: &[K], keys: &[K],
chunk: &mut BatchGetChunk<'_>, chunk: &mut BatchGetChunk<'_>,
results: &ConcurrentSlice<'_, Option<ArcBytes>>, on_result: &impl Fn(usize, Option<ArcBytes>) -> Result<()>,
key_block_cache: &BlockCache, key_block_cache: &BlockCache,
value_block_cache: &BlockCache, value_block_cache: &BlockCache,
) -> Result<()> { ) -> Result<()> {
...@@ -2565,7 +2575,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2565,7 +2575,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
let value = match value { let value = match value {
LookupValue::KeyDeleted => { LookupValue::KeyDeleted => {
counts.deleted += 1; counts.deleted += 1;
return Ok(()); return on_result(index as usize, None);
} }
LookupValue::KeyValueDeleted { .. } => { LookupValue::KeyValueDeleted { .. } => {
// Key-value tombstones are only written to MultiValue families, and // Key-value tombstones are only written to MultiValue families, and
...@@ -2594,11 +2604,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2594,11 +2604,7 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
} }
}; };
counts.result_size += value.len(); counts.result_size += value.len();
// SAFETY: Every key index occurs in exactly one cell, every cell belongs to exactly one on_result(index as usize, Some(value))
// chunk, and `batch_lookup_entry` reports each cell at most once since it is marked as
// resolved. So every index is written at most once.
unsafe { results.write(index as usize, Some(value)) };
Ok(())
}; };
let shard_files = inner.shard_indices[family].shard(*shard); let shard_files = inner.shard_indices[family].shard(*shard);
#[cfg(feature = "stats")] #[cfg(feature = "stats")]
...@@ -2636,6 +2642,14 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES> ...@@ -2636,6 +2642,14 @@ impl<S: ParallelScheduler, const FAMILIES: usize> TurboPersistence<S, FAMILIES>
// `on_found` borrows `counts`. // `on_found` borrows `counts`.
drop(on_found); drop(on_found);
counts.not_found += cells.len() - resolved_count; counts.not_found += cells.len() - resolved_count;
if resolved_count < cells.len() {
for (position, &(_, index)) in cells.iter().enumerate() {
// `batch_get` has at most `u32::MAX` keys, so positions fit in a `u32`.
if !resolved.contains(position as u32) {
on_result(index as usize, None)?;
}
}
}
#[cfg(feature = "stats")] #[cfg(feature = "stats")]
{ {
counts.range_misses += lookup_counts.range_misses; counts.range_misses += lookup_counts.range_misses;
......
...@@ -15,7 +15,6 @@ mod collector; ...@@ -15,7 +15,6 @@ mod collector;
mod collector_entry; mod collector_entry;
mod compaction; mod compaction;
mod compression; mod compression;
mod concurrent_slice;
mod constants; mod constants;
mod db; mod db;
mod key; mod key;
......
//! Benchmarks sequential vs parallel decoding of a `batch_lookup_data` batch, used to pick
//! `PARALLEL_DECODE_THRESHOLD`.
//!
//! Only decoding is timed: the raw bytes are read from a real persisted database once during setup,
//! so disk I/O does not hide the scheduling overhead of the parallel path.
//!
//! Gated behind `TURBOPACK_BENCH_BATCH_LOOKUP` because the setup builds and persists a task graph.
//! Run with:
//!
//! ```bash
//! TURBOPACK_BENCH_BATCH_LOOKUP=1 cargo bench -p turbo-tasks-backend --bench mod -- batch_lookup
//! ```
use std::{
hint::black_box,
time::{Duration, Instant},
};
use anyhow::Result;
use criterion::{BenchmarkId, Criterion, Throughput};
use turbo_tasks::{TaskId, TurboTasks, Vc};
use turbo_tasks_backend::{
BackendOptions, BackingStorageOptions, GitVersionInfo, StorageMode, TurboTasksBackend,
private::{
ArcBytes, PARALLEL_DECODE_THRESHOLD, SpecificTaskDataCategory, batch_lookup_raw,
decode_task_storage_batch,
},
};
/// Batch sizes to measure. Must not exceed the number of persisted tasks.
const SIZES: &[usize] = &[2, 8, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];
/// Leaves of the persisted tree. Together with the interior nodes this is more than the largest
/// batch size.
const LEAVES: u32 = 16384;
const BRANCHING: u32 = 4;
fn enabled() -> bool {
!matches!(
std::env::var("TURBOPACK_BENCH_BATCH_LOOKUP")
.ok()
.as_deref(),
None | Some("") | Some("no") | Some("false")
)
}
const VERSION_INFO: GitVersionInfo = GitVersionInfo {
describe: "bench-unversioned",
dirty: false,
};
const STORAGE_OPTIONS: BackingStorageOptions = BackingStorageOptions {
is_ci: false,
is_short_session: true,
skip_compaction: true,
};
#[turbo_tasks::function]
fn leaf(index: u32) -> Vc<u32> {
Vc::cell(index.wrapping_mul(1_000_003))
}
#[turbo_tasks::function]
async fn node(index: u32, span: u32) -> Result<Vc<u32>> {
if span <= 1 {
return Ok(leaf(index));
}
let child_span = span.div_ceil(BRANCHING);
let mut sum = 0u32;
let mut start = index;
while start < index + span {
let this_span = child_span.min(index + span - start);
sum = sum.wrapping_add(*node(start, this_span).await?);
start += this_span;
}
Ok(Vc::cell(sum))
}
#[turbo_tasks::function(operation, root)]
fn root() -> Vc<u32> {
node(0, LEAVES)
}
/// Builds and persists a task graph, then reads the raw bytes of every persisted task for both
/// categories.
fn setup(rt: &tokio::runtime::Runtime) -> (Vec<ArcBytes>, Vec<ArcBytes>, tempfile::TempDir) {
let parent = std::path::PathBuf::from(format!("{}/.cache", env!("CARGO_TARGET_TMPDIR")));
std::fs::create_dir_all(&parent).unwrap();
let dir = tempfile::Builder::new()
.prefix("batch-lookup-bench-")
.tempdir_in(&parent)
.unwrap();
rt.block_on(async {
// `TurboTasks::new` needs the runtime context.
let tt = TurboTasks::new(TurboTasksBackend::new(
BackendOptions {
storage_mode: Some(StorageMode::ReadWriteOnShutdown),
..Default::default()
},
turbo_tasks_backend::turbo_backing_storage(dir.path(), &VERSION_INFO, STORAGE_OPTIONS)
.unwrap()
.0,
));
turbo_tasks::run_once(tt.clone(), async move {
root().read_strongly_consistent().await?;
anyhow::Ok(())
})
.await
.unwrap();
tt.stop_and_wait().await;
});
let (meta, data) = rt.block_on(async {
let (storage, _) =
turbo_tasks_backend::turbo_backing_storage(dir.path(), &VERSION_INFO, STORAGE_OPTIONS)
.unwrap();
// Persistent task ids are allocated densely from 1. Over-fetch and drop the misses.
let task_ids: Vec<TaskId> = (1..=LEAVES * 4)
.map(|id| TaskId::try_from(id).unwrap())
.collect();
let fetch = |category| -> Vec<ArcBytes> {
batch_lookup_raw(&storage, &task_ids, category)
.unwrap()
.into_iter()
.flatten()
.collect()
};
(
fetch(SpecificTaskDataCategory::Meta),
fetch(SpecificTaskDataCategory::Data),
)
});
let max = *SIZES.iter().max().unwrap();
assert!(
meta.len() >= max && data.len() >= max,
"not enough persisted tasks: meta={}, data={}, need {max}",
meta.len(),
data.len()
);
(meta, data, dir)
}
/// Times `iters` decodes of `bytes[..size]` on a runtime worker thread, which is where
/// `batch_lookup_data` runs in practice. Only the decode call is timed, not dropping the decoded
/// storages (which in practice are moved into the in-memory storage).
fn time_decode(
rt: &tokio::runtime::Runtime,
bytes: &[ArcBytes],
size: usize,
category: SpecificTaskDataCategory,
threshold: usize,
iters: u64,
) -> Duration {
let input: Vec<Option<ArcBytes>> = bytes[..size].iter().cloned().map(Some).collect();
rt.block_on(async move {
tokio::spawn(async move {
let mut total = Duration::ZERO;
for _ in 0..iters {
let start = Instant::now();
let decoded =
decode_task_storage_batch(black_box(&input), category, threshold).unwrap();
total += start.elapsed();
drop(black_box(decoded));
}
total
})
.await
.unwrap()
})
}
pub fn batch_lookup(c: &mut Criterion) {
if !enabled() {
return;
}
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap();
let (meta, data, _dir) = setup(&rt);
for (name, category, bytes) in [
("meta", SpecificTaskDataCategory::Meta, &meta),
("data", SpecificTaskDataCategory::Data, &data),
] {
let mut group = c.benchmark_group(format!("turbo_tasks_backend_batch_lookup/{name}"));
group.measurement_time(Duration::from_secs(2));
group.warm_up_time(Duration::from_secs(1));
for &size in SIZES {
group.throughput(Throughput::Elements(size as u64));
for (mode, threshold) in [
("sequential", usize::MAX),
("parallel", 0),
("default", PARALLEL_DECODE_THRESHOLD),
] {
group.bench_with_input(BenchmarkId::new(mode, size), &size, |b, &size| {
b.iter_custom(|iters| time_decode(&rt, bytes, size, category, threshold, iters))
});
}
}
group.finish();
}
}
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
use criterion::{Criterion, criterion_group, criterion_main}; use criterion::{Criterion, criterion_group, criterion_main};
pub(crate) mod batch_lookup;
pub(crate) mod cell_fan_out; pub(crate) mod cell_fan_out;
pub(crate) mod collectibles; pub(crate) mod collectibles;
pub(crate) mod gc; pub(crate) mod gc;
...@@ -16,7 +15,6 @@ criterion_group!( ...@@ -16,7 +15,6 @@ criterion_group!(
name = turbo_tasks_backend_stress; name = turbo_tasks_backend_stress;
config = Criterion::default(); config = Criterion::default();
targets = stress::fibonacci, scope_stress::scope_stress, overhead::overhead, gc::gc, targets = stress::fibonacci, scope_stress::scope_stress, overhead::overhead, gc::gc,
cell_fan_out::cell_fan_out, state_fan_out::state_fan_out, collectibles::collectibles, cell_fan_out::cell_fan_out, state_fan_out::state_fan_out, collectibles::collectibles
batch_lookup::batch_lookup
); );
criterion_main!(turbo_tasks_backend_stress); criterion_main!(turbo_tasks_backend_stress);
...@@ -92,8 +92,15 @@ impl TurboKeyValueDatabase { ...@@ -92,8 +92,15 @@ impl TurboKeyValueDatabase {
self.db.get(key_space as usize, &key) self.db.get(key_space as usize, &key)
} }
pub fn batch_get(&self, key_space: KeySpace, keys: &[&[u8]]) -> Result<Vec<Option<ArcBytes>>> { /// Looks up many keys at once. See [`TurboPersistence::batch_get`] for how `on_result` is
self.db.batch_get(key_space as usize, keys) /// called.
pub fn batch_get(
&self,
key_space: KeySpace,
keys: &[&[u8]],
on_result: impl Fn(usize, Option<ArcBytes>) -> Result<()> + Sync,
) -> Result<()> {
self.db.batch_get(key_space as usize, keys, on_result)
} }
/// Looks up a key and returns all matching values. /// Looks up a key and returns all matching values.
......
...@@ -105,26 +105,3 @@ pub fn compact_database( ...@@ -105,26 +105,3 @@ pub fn compact_database(
db.shutdown(); db.shutdown();
Ok(()) Ok(())
} }
/// Internals exposed for benchmarks only. Not a stable API.
#[doc(hidden)]
pub mod private {
use anyhow::Result;
pub use turbo_persistence::ArcBytes;
use turbo_tasks::TaskId;
use crate::kv_backing_storage::TurboBackingStorage;
pub use crate::{
backend::{SpecificTaskDataCategory, storage_schema::TaskStorage},
kv_backing_storage::{PARALLEL_DECODE_THRESHOLD, decode_task_storage_batch},
};
/// See `TurboBackingStorage::batch_lookup_raw`.
pub fn batch_lookup_raw(
storage: &TurboBackingStorage,
task_ids: &[TaskId],
category: SpecificTaskDataCategory,
) -> Result<Vec<Option<ArcBytes>>> {
storage.batch_lookup_raw(task_ids, category)
}
}
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