Documentation / @etherfold/processor-entities / PruneOptions
Type Alias: PruneOptions ​
PruneOptions =
object
Defined in: packages/state-store/dist/retention.d.ts:74
How much work ONE prune call may do.
Properties ​
maxVersions? ​
readonlyoptionalmaxVersions?:number
Defined in: packages/state-store/dist/retention.d.ts:88
Stop after deleting this many versions and leave the rest for the next call.
This is what makes an AMORTISED policy expressible above the seam without the store guessing one: a host that wants to spread the cost calls prune({maxVersions: n}) on its own schedule and watches complete, while a host that wants the whole pass calls prune() and pays for it once. Pruning is not free (a prune plus VACUUM measured 1.1 s at 62,553 versions in work/notes/findings/sqlite-in-the-browser.md), which is exactly why the budget is the caller's to set.
Unset means no budget: prune until there is nothing left to prune.