pub fn floor_unrestored_pipelines(
db: &Db,
target_watermark: Watermark,
target_chain_id: ChainId,
layer: &RestoreLayer,
) -> Result<()>Expand description
After restore_indexes returns, prime the framework state of
every pipeline that the restore did not cover so tip indexing
resumes from target_watermark.checkpoint_hi_inclusive + 1
across the board instead of replaying from genesis for the
raw-chain-data and bitmap pipelines.
Specifically, for every pipeline not in layer’s restored
set, writes:
__watermark = target_watermark— the framework’s tip-resume reads this and starts atcheckpoint_hi_inclusive + 1.__chain_id = target_chain_id— pins the pipeline to the chain the snapshot was taken from, matching whatrestore_indexes’s finalize step already wrote for the restored pipelines.
Also writes the singleton pruning_watermark so
available_range queries and the bitmap CFs’ compaction
filters reflect that data only starts at the post-restore
floor (tx_seq_lo = target_watermark.tx_hi,
checkpoint_lo = checkpoint_hi_inclusive + 1).
Idempotent: re-running after a successful restore overwrites the unrestored pipelines’ watermarks with the same values and re-writes the pruning row.