devbox/cmd/devbox-hub
shoemoney f51e69839a
Some checks are pending
CI / vet-build-test (push) Waiting to run
fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾
`backup` does VACUUM INTO (DB snapshot) then copies the blob tree; a concurrent
gc sweep could delete a blob the snapshot references between those steps,
producing a backup that's internally inconsistent — a dangling ref you'd only
discover on restore. Now gc sweeps (the --gc-every ticker AND `gc`) and `backup`
take an exclusive flock on <data>/.lock, so they can't overlap. Dry-run gc skips
the lock (read-only, must not block a long backup). unix flock (auto-released on
crash); no-op stub on non-unix (the hub ships linux/darwin).

Test: TestDataLockMutualExclusion. Cross-builds clean for windows + linux/arm64.
2026-06-30 17:27:00 -05:00
..
fsck_share_test.go round5-hub: fsck (at-rest blob integrity) + share ls 2026-06-30 15:28:02 -05:00
fsck_test.go feat(hub): fsck also detects dangling snapshots (manifest refs a missing blob) 2026-06-30 16:25:06 -05:00
gc_crossshare_test.go round3-hub: backup, metrics auth, device ls, gc --keep-days, access log 2026-06-30 13:53:16 -05:00
gc_test.go round3-hub: backup, metrics auth, device ls, gc --keep-days, access log 2026-06-30 13:53:16 -05:00
isloopback_test.go round4-hub: non-loopback listen warning, version in startup log, graceful shutdown 🛰️🛑 2026-06-30 14:23:42 -05:00
lock_other.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00
lock_test.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00
lock_unix.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00
main.go fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾 2026-06-30 17:27:00 -05:00