Repository navigation
pool: O(1) archive pin check, follow-ups to #380 - #381
Merged
Merged
Conversation
archiveCkPinned copied the whole pin set under m.mu to test one id. The claim store already counts references, so the check is a map lookup: 5000 checkpoint claims, mac m2 max, interleaved, 162 us / 218 KB / 18 allocs -> 25 ns / 0 allocs. DeleteCheckpoint, retryArchiveDelete (once per marker) and dropStaleRow call it.
… failover off Also fix the replica release order (tombstone before replica) and the on_expire value (destroy, not release).
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.
Follow-ups to #380.
Changes
archiveCkPinnedcopied the whole pin set underm.muto test one id. It now reads the claim store's reference counts and the pending set directly. Callers:DeleteCheckpoint,retryArchiveDelete(once per delete marker) anddropStaleRow.deleteCkLockedhad one caller left after fix(sandboxd): retain checkpoints through failed claim writes #380; it is inlined intosweepExpiredCheckpoints.TestArchiveDeleteRetryRechecksWakeRollbackreceived from an already-drained closed channel a second time; the dead receive is removed.docs/cluster.md:archive_failoveroff leaves a replica claim's row and checkpoint behind when the claim ends;on_expirevalue isdestroy, notrelease.Prod −3 lines, test −1, 0 comments added.
Performance
5000 claims each holding a checkpoint, mac M2 Max,
-cpu 1, arms interleaved main/branch/branch/main ×3:archiveCkPinned, one callpinnedArchiveCks(control)Verification
fmt --diffempty.go test -race ./...in sandboxd: pass on macOS; pass on Linux arm64 as uid 1000, exceptutils/TestCloneFileRemovesFailedDestination, which fails the same way on main in that container.