Documentation
¶
Overview ¶
Package provenancesweep trims the provenance captures that outlived the versions they describe.
A capture is appended to an asset on every content write, and until #1623 nothing removed one. An asset whose history is capped at twelve versions carried captures for three hundred and thirty-three of them, describing versions the platform had already deleted. The prune now drops a version's capture with the version, which holds for every write from here on; this pass is what settles the rows written before it.
It is a pass rather than a migration because the rule it applies depends on the deployment's portal.max_versions, which a migration cannot read. It is idempotent -- an asset with nothing left to trim is not written -- so a second replica, or a second boot, does no work.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run trims every asset whose captures describe versions its retention cap has removed. platformDefault is the deployment's configured portal.max_versions, nil where it set none; the cap the pass applies is what the prune applies, resolved the same way, and an unlimited cap leaves an asset with no override of its own alone.
A failure to trim one asset is logged and the pass continues: the point is to settle a library, and one row the database refused is not a reason to leave the rest carrying history for versions that no longer exist.
Types ¶
This section is empty.