Skip to content

fix: prune by block height so a lost queue does not stop pruning - #381

Open
mennatnaga wants to merge 3 commits into
menna/pruner-bounded-stopfrom
fix/pruner-height-ceiling-360
Open

fix: prune by block height so a lost queue does not stop pruning#381
mennatnaga wants to merge 3 commits into
menna/pruner-bounded-stopfrom
fix/pruner-height-ceiling-360

Conversation

@mennatnaga

@mennatnaga mennatnaga commented Sep 2, 2026

Copy link
Copy Markdown
Member

Stacked on #360.

The pruner only knew what its in-memory queue told it, so a host that lost the queue on restart pruned nothing at all. This adds a sweep that reads the store directly and removes anything below highest_block - max_blocks.

The sweep and the queue drain get a max_docs_per_cycle budget each instead of sharing one, otherwise a queue far enough over its threshold takes the whole budget and the sweep never runs.

@mennatnaga mennatnaga self-assigned this Sep 2, 2026
@mennatnaga
mennatnaga force-pushed the menna/pruner-bounded-stop branch from e7d050e to 66a1b8b Compare September 2, 2026 02:26
@mennatnaga
mennatnaga force-pushed the fix/pruner-height-ceiling-360 branch from 52ddce2 to c79c28b Compare September 2, 2026 02:26
@mennatnaga
mennatnaga marked this pull request as ready for review September 2, 2026 10:49
@mennatnaga
mennatnaga requested a review from chexware September 2, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant