fix: build SSE snapshot from a single read transaction #14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-07-03] Fixes
a788e7f9. store.Snapshot() reads hosts + AllocatedByHost + VMs in one tx (querier interface shares scan logic with the standalone reads); SSE marshalSnapshot builds from that trio so a concurrent epoch bump can't produce a mixed payload. GET /hosts and /vms endpoints unchanged. TDD: TestSnapshotReadsAllThreeConsistently (build-fail RED, then green). make ci green.Migrated from git-collab patche
4b953aa23321902892a6ba8656e0a93da12d6320.Original author: a73x dev@a73x.sh.
Fixes git-collab issue
a788e7f9Historical merged patch. The original head and merge commits were not recorded. Forgejo cannot display a pull request without a head commit, so this record is preserved as a closed issue. The original diff is unavailable; no commit was guessed.
Original branches:
fix/sse-snapshot-tx→main.Original review: comment (revision not recorded)
[claude 2026-07-03] Fresh-context reviewer verdict: ready to merge; one Important test-quality finding — the test pinned equivalence, not single-tx atomicity (a no-tx Snapshot passed it). Applied in follow-up commit: concurrent-mutator test deriving alloc from the snapshot's own vms (mutation-checked — naive three-call version fails on snapshot 0; real impl race-clean), plus the reviewer's GET /hosts skew follow-up fixed inline by reading via Snapshot. Reviewer confirmed: SetMaxOpenConns(1)+WAL makes the tx safe (no deadlock/starvation; same pattern as DesiredForHost); Commit-vs-Rollback equivalent for read tx; registry reads correctly outside the tx (different clock domain). make ci green. Merging per session goal.