Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
Alex Chi Z
2023-07-11 13:59:26 -04:00
parent a265efa7a5
commit 9cdd9a2801
2 changed files with 10 additions and 7 deletions

View File

@@ -269,7 +269,7 @@ impl LayerMap {
match (latest_delta, latest_image) {
(None, None) => None,
(None, Some(image)) => {
let lsn_floor = image.get_lsn_range().start;
let lsn_floor = image.get_lsn_range().end;
Some(SearchResult {
layer: image,
lsn_floor,
@@ -289,7 +289,7 @@ impl LayerMap {
if image_is_newer || image_exact_match {
Some(SearchResult {
layer: image,
lsn_floor: img_lsn,
lsn_floor: img_lsn + 1,
})
} else {
let lsn_floor =

View File

@@ -2570,6 +2570,7 @@ impl Timeline {
let open_layer = Arc::clone(open_layer);
move || open_layer.traversal_id()
}),
false,
));
continue 'outer;
}
@@ -2598,6 +2599,7 @@ impl Timeline {
let frozen_layer = Arc::clone(frozen_layer);
move || frozen_layer.traversal_id()
}),
false,
));
continue 'outer;
}
@@ -2632,9 +2634,7 @@ impl Timeline {
&& matches!(result, ValueReconstructResult::Continue)
{
last_round_image = true;
continue 'outer;
};
}
cont_lsn = lsn_floor;
*read_count += 1;
traversal_path.push((
@@ -2644,6 +2644,7 @@ impl Timeline {
let layer = Arc::clone(&layer);
move || layer.traversal_id()
}),
exclude_image_this_round,
));
continue 'outer;
}
@@ -5419,6 +5420,7 @@ type TraversalPathItem = (
ValueReconstructResult,
Lsn,
Box<dyn Send + FnOnce() -> TraversalId>,
bool,
);
/// Helper function for get_reconstruct_data() to add the path of layers traversed
@@ -5428,12 +5430,13 @@ fn layer_traversal_error(msg: String, path: Vec<TraversalPathItem>) -> PageRecon
// is the most high-level information, which also gets propagated to the client.
let mut msg_iter = path
.into_iter()
.map(|(r, c, l)| {
.map(|(r, c, l, exclude_image)| {
format!(
"layer traversal: result {:?}, cont_lsn {}, layer: {}",
"layer traversal: result {:?}, cont_lsn {}, layer: {}, exclude_image: {}",
r,
c,
l(),
exclude_image,
)
})
.chain(std::iter::once(msg));