-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Right now, when we call get_ranges from Python it calls the underlying get_ranges method from the trait:
Line 440 in fbaeb7f
| let out = runtime.block_on(store.as_ref().get_ranges(path.as_ref(), &ranges))?; |
That trait method is a provided method with a hard-coded default.
It would be preferable if we allowed for a user-configurable coalesce range. We can do this by just copying that function into get.rs and calling it instead of the trait.
/// Return the bytes that are stored at the specified location
/// in the given byte ranges
async fn _get_ranges_impl(&self, location: &Path, ranges: &[Range<u64>], coalesce: usize) -> Result<Vec<Bytes>> {
coalesce_ranges(
ranges,
|range| self.get_range(location, range), coalesce,
)
.await
}and then updating our get_ranges and get_ranges_async to take in a keyword-only optional parameter for the coalesce size.
hrodmn and vincentsarago
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers