Skip to content

Commit

Permalink
object: fix read range over chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Wünsche committed May 7, 2024
1 parent 7deb72b commit 975e3ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions betree/src/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ impl<'ds> ObjectHandle<'ds> {
let mut last_offset = offset;

let chunks = self
.read_chunk_range(chunk_range.start.chunk_id..chunk_range.end.chunk_id + 1)
.read_chunk_range(chunk_range.start.chunk_id..chunk_range.end.chunk_id)
.map_err(|e| (total_read, e))?;

for chunk in chunks {
Expand Down Expand Up @@ -892,7 +892,7 @@ impl<'ds> ObjectHandle<'ds> {
let start = Instant::now();
let iter = self.store.data.range(
&object_chunk_key(self.object.id, chunk_range.start)[..]
..&object_chunk_key(self.object.id, chunk_range.end),
..=&object_chunk_key(self.object.id, chunk_range.end),
)?;

let with_chunks = iter.map(|res| match res {
Expand Down

0 comments on commit 975e3ba

Please sign in to comment.