Add COW storage lifecycle diagnostics#15
Merged
Conversation
2fb6e8d to
365f00c
Compare
d210e08 to
ae2a48e
Compare
365f00c to
4dc4ef3
Compare
Contributor
|
Reviewed and recorded follow-up notes under the PR #15 section in issue #30: #30 (comment) |
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.
What it does
Adds
forkpress storage compactfor macOS APFS sparsebundle-backed COW sites and expandsforkpress storage statuswith branch/storage roots, lock paths, branch counts, and interrupted-operation leftovers.This is stacked on #14.
Rationale
Sparsebundle-backed sites need a single ForkPress-managed way to stop the site, detach storage, reclaim free image bands, and explain what is still attached or left behind. Direct
hdiutil/rm -rfworkflows are too easy to get wrong while a server or branch mutation is active.Implementation
storage compactstops this site's server unless--keep-serveris passed, detaches sparsebundle storage, runshdiutil compact, and leaves storage detached untilforkpress serveorforkpress storage mount.The COW lifecycle now uses:
operations.lockfor branch/storage mutations and request exclusion.lifecycle.lockso background server startup and detach/compact cannot race.The COW E2E now checks lifecycle diagnostics and exercises
storage compact; macOS CI runs that path withFORKPRESS_FORCE_MACOS_APFS_SPARSEBUNDLE=1.Testing instructions
FORKPRESS_RUNTIME_BUNDLE=/dev/null cargo test -p forkpress make test-all cargo build --release --target x86_64-unknown-linux-musl -p forkpress tests/test_cow_strategy_e2e.sh target/x86_64-unknown-linux-musl/release/forkpress