Repository navigation
docs: an archive_delete caps the span at the last deadline in archived too - #532
Merged
Merged
Conversation
…d too The fold rule capped archive_delete only outside archived, so inside it the archived-storage span ran to the purge's t: past the retention deadline by the sweep's tick, the owner's downtime, and up to the hour-late orphan sweep. Capping it at the last deadline in every state ends that span at the archive's retention deadline on every purge path, including the orphan-row purges, which can neither tell their claim's fold state nor record a reap without ending a still-running compute span at the retention deadline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The usage fold capped an
archive_deleteat min(t, the lastdeadline) only outsidearchived. Insidearchived, the span ended at the purge's ownt, so archived storage was billed past the retention deadline by:cluster.mdcalls "up to an hour late".This PR applies the cap in every state. Inside
archived, the last deadline is the retention deadline carried by thearchiveoradoptthat entered the state, so every purge path now ends the archived span there.Why this is a contract change rather than an event in the code:
sweepOrphanArchivesfor a departed owner's row, andreconcileOwnRowfor an unheld row) cannot tell their claim's fold state.claim(TestReconcileWithTheRegistryDownRecordsOnlyTheEndNoOtherNodeCanHold), so it is stillrunningwhen its row is purged.reapwith the row's deadline would end that compute span at the retention deadline instead of the lease's. review: 7 fixes, cuts, docs against the code #530 tried that and reverted it. review: 7 fixes, cuts, docs against the code #530 now pins the purge of that row toclaim,archive_delete.archive_deletein every state bills both cases right with no new event. The local purge's reap-first order from review: 7 fixes, cuts, docs against the code #530 (4a0cb95) stays correct, but it is no longer needed for billing.Consumers that fold the journal must apply the same cap in
archived. A fold that already capsarchive_deleteat the last deadline in every state needs no change.Docs only. No code or test change.