Log how much data the ledger holds before processing it (#9079)
This commit is contained in:
parent
2623c71ed3
commit
b8fda9d730
|
@ -433,7 +433,7 @@ impl Blockstore {
|
|||
pub fn slot_meta_iterator<'a>(
|
||||
&'a self,
|
||||
slot: Slot,
|
||||
) -> Result<impl Iterator<Item = (u64, SlotMeta)> + 'a> {
|
||||
) -> Result<impl Iterator<Item = (Slot, SlotMeta)> + 'a> {
|
||||
let meta_iter = self
|
||||
.db
|
||||
.iter::<cf::SlotMeta>(IteratorMode::From(slot, IteratorDirection::Forward))?;
|
||||
|
|
|
@ -310,7 +310,7 @@ pub fn process_blockstore_from_root(
|
|||
opts: &ProcessOptions,
|
||||
recyclers: &VerifyRecyclers,
|
||||
) -> BlockstoreProcessorResult {
|
||||
info!("processing ledger from root slot {}...", bank.slot());
|
||||
info!("processing ledger from slot {}...", bank.slot());
|
||||
let allocated = thread_mem_usage::Allocatedp::default();
|
||||
let initial_allocation = allocated.get();
|
||||
|
||||
|
@ -345,6 +345,12 @@ pub fn process_blockstore_from_root(
|
|||
.set_roots(&[start_slot])
|
||||
.expect("Couldn't set root slot on startup");
|
||||
|
||||
if let Ok(metas) = blockstore.slot_meta_iterator(start_slot) {
|
||||
if let Some((slot, _meta)) = metas.last() {
|
||||
info!("ledger holds data through slot {}", slot);
|
||||
}
|
||||
}
|
||||
|
||||
let meta = blockstore.meta(start_slot).unwrap();
|
||||
|
||||
// Iterate and replay slots from blockstore starting from `start_slot`
|
||||
|
|
Loading…
Reference in New Issue