prioritize slot repairs for unknown last index and close to completion (#21070)

This commit is contained in:
Jeff Biseda
2021-11-19 19:17:30 -08:00
committed by GitHub
parent ebea3297f9
commit 2ed7e3af89
6 changed files with 600 additions and 18 deletions

View File

@ -192,6 +192,14 @@ impl SlotMeta {
self.consumed == self.last_index + 1
}
pub fn known_last_index(&self) -> Option<u64> {
if self.last_index == std::u64::MAX {
None
} else {
Some(self.last_index)
}
}
pub fn is_parent_set(&self) -> bool {
self.parent_slot != std::u64::MAX
}