Skip to content

Commit

Permalink
Debugging issue with true read-only sqlite extents
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Oct 24, 2023
1 parent debd44e commit addb3e8
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions downstairs/src/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2311,12 +2311,11 @@ pub(crate) mod test {
.join(extent_file_name(i, ExtentType::Db))
.exists());
}
let read_from_region: Vec<u8> = region
.region_read(&requests, JobId(0))
.await?
.into_iter()
.flat_map(|i| i.data.to_vec())
.collect();
let mut read_from_region: Vec<u8> = vec![];
for r in region.region_read(&requests, JobId(0)).await?.into_iter() {
read_from_region.extend(r.data.iter());
assert_eq!(r.block_contexts.len(), 1);
}

assert_eq!(buffer.len(), read_from_region.len());
assert_eq!(buffer, read_from_region);
Expand Down Expand Up @@ -2425,12 +2424,11 @@ pub(crate) mod test {
.join(extent_file_name(i, ExtentType::Db))
.exists());
}
let read_from_region: Vec<u8> = region
.region_read(&requests, JobId(0))
.await?
.into_iter()
.flat_map(|i| i.data.to_vec())
.collect();
let mut read_from_region: Vec<u8> = vec![];
for r in region.region_read(&requests, JobId(0)).await?.into_iter() {
read_from_region.extend(r.data.iter());
assert_eq!(r.block_contexts.len(), 1);
}

assert_eq!(buffer.len(), read_from_region.len());
assert_eq!(buffer, read_from_region);
Expand Down

0 comments on commit addb3e8

Please sign in to comment.