Skip to main content

embedded_prunable_checkpoint

Function embedded_prunable_checkpoint 

Source
pub fn embedded_prunable_checkpoint(db: &Db) -> Result<Option<u64>>
Expand description

The highest checkpoint the embedded fullnode’s pruner may prune through (inclusive) without deleting source data the embedded indexer still needs: min(checkpoint_hi_inclusive) across every embedded-cohort pipeline (LIVE_COHORT and HISTORY_COHORT).

Both cohorts assemble full checkpoints from the perpetual and checkpoint stores through the local ingestion client — the history cohort while backfilling (L, T], the live cohort when filling gaps behind the executor’s broadcast stream — so a checkpoint’s data may only be deleted once every pipeline has committed it. Pruning past a pipeline’s watermark would leave that pipeline permanently stalled on a checkpoint that can no longer be served (NotFound is retried forever).

Returns None when any cohort pipeline has no watermark yet — a from-genesis build before that pipeline’s first commit — in which case nothing may be pruned: the pipeline still needs the entire available range.