Sujeet
08/20/2025, 5:49 AMrust
let mut l0_iters = VecDeque::new();
for sst in &db_state.core().l0 {
if let Some(iter) = SstIterator::new_owned(
range.clone(),
sst.clone(),
self.table_store.clone(),
sst_iter_options,
)
.await?
{
l0_iters.push_back(iter);
}
}
let mut sr_iters = VecDeque::new();
for sr in &db_state.core().compacted {
let iter = SortedRunIterator::new_owned(
range.clone(),
sr.clone(),
self.table_store.clone(),
sst_iter_options,
)
.await?;
sr_iters.push_back(iter);
}
Something like combining all using an .allOf on all the collected CompletableFutures in java and then a .get.
cc: @criccominicriccomini
08/21/2025, 1:03 AMcriccomini
08/21/2025, 1:04 AMcriccomini
08/21/2025, 1:04 AMSujeet
08/21/2025, 1:12 AMread_index could call the object store in case there is a cache miss.
Based on the current code logic, the calls to the object store might be serial( since we build iterators one by one).
Parallelising the above code would also parallelise the fetch, right?criccomini
08/21/2025, 1:14 AMcriccomini
08/21/2025, 1:15 AMSujeet
08/21/2025, 1:18 AMcriccomini
08/21/2025, 1:18 AMSujeet
08/21/2025, 1:18 AMcriccomini
08/21/2025, 1:19 AMcriccomini
08/21/2025, 1:19 AMcriccomini
08/21/2025, 1:19 AMcriccomini
08/21/2025, 1:19 AMSujeet
08/21/2025, 1:20 AMcriccomini
08/21/2025, 1:20 AMcriccomini
08/21/2025, 1:20 AMSujeet
08/21/2025, 1:21 AMcriccomini
08/21/2025, 1:21 AMSujeet
08/21/2025, 1:21 AMcriccomini
08/21/2025, 1:22 AMMergeIteratorcriccomini
08/21/2025, 1:22 AMcriccomini
08/21/2025, 1:23 AMSujeet
08/21/2025, 1:32 AMRohan
08/21/2025, 5:56 AMSujeet
08/21/2025, 6:02 AMRohan
08/21/2025, 6:20 AMMergeIterator. Maybe just some helper fn that takes a list of sources and returns iterators is good enoughcriccomini
08/21/2025, 1:39 PMSujeet
08/21/2025, 2:59 PMSujeet
08/21/2025, 6:00 PMPierre
08/21/2025, 7:02 PMPierre
08/21/2025, 7:05 PMcriccomini
08/21/2025, 7:09 PMmax_fetch_tasks and blocks_to_fetch, which Rohan had been suspicious about. It also updates scan (not just compactor). And centralizes logic.Pierre
08/21/2025, 7:17 PMPierre
08/21/2025, 7:17 PMcriccomini
08/21/2025, 7:42 PMPierre
08/21/2025, 7:42 PMPierre
08/21/2025, 7:43 PMSujeet
08/22/2025, 3:41 AMSujeet
08/22/2025, 3:54 AMSujeet
08/22/2025, 4:18 PMSujeet
08/22/2025, 4:18 PMcriccomini
08/22/2025, 6:01 PM