Add some comments to the checkpoint process

This commit is contained in:
Patrick Insinger
2021-09-16 13:13:55 -07:00
committed by lubennikovaav
parent 7fb7f67bb4
commit c81ee3bd5b

View File

@@ -1384,7 +1384,9 @@ impl LayeredTimeline {
// Finally, replace the frozen in-memory layer with the new on-disk layers
layers.remove_historic(frozen.as_ref());
//FIXME This needs a comment.
// If we created a successor InMemoryLayer, its predecessor is
// currently the frozen layer. We need to update the predecessor
// to be the latest on-disk layer.
if let Some(last_historic) = new_historics.last() {
if let Some(new_open) = &maybe_new_open {
let maybe_old_predecessor =
@@ -1395,6 +1397,7 @@ impl LayeredTimeline {
}
}
// Add the historics to the LayerMap
for n in new_historics {
layers.insert_historic(n);
}