beads/internal/storage/dbproxy
Julian Knutsen c9a36b248c
fix(dbproxy): wait out a live starter's spawn marker instead of a fixed 5s (#7249)
Shutdown advances the stop epoch, then waits while a live starter's
proxy.spawn marker covers the release-lock-before-exec window. That wait
shared shutdownConfirmDeadline (5s) with the kill/confirm phases, but the
starter legitimately holds the marker longer: it waits up to openDeadline
for the child to take proxy.lock (which clears the marker) and then up to
shutdownConfirmDeadline each to kill the child and clear the marker. On a
loaded host (CI -race runners) a slow fork/exec pushed the start past 5s
and `bd dolt stop` reported "proxy.Shutdown partial: backend stopped;
proxy left running: timeout (5s) waiting for spawn marker" for a start that
was still progressing and about to abort on the advanced epoch. This is the
TestShutdownWaitsForStartDelayedBeforeExec flake.

The marker is only treated as active while its owner's verified identity
is alive (a dead owner's marker is removed on sight), so bound the wait by
the starter's own budgets (shutdownSpawnWaitDeadline = openDeadline +
2*shutdownConfirmDeadline) and give the post-start stop phases a fresh
shutdownConfirmDeadline once the marker resolves.

Tests: TestShutdownWaitsForLiveStarterPastConfirmDeadline holds the start
before exec past shutdownConfirmDeadline; it fails deterministically with
the CI signature before this change. Both spawn/stop tests share a helper
and use generous hang-detector timeouts.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 08:53:11 -07:00
..
identity test(bazel): runfiles helpers + declared inputs for scan-guard tests (#6828) 2026-09-27 08:24:08 -07:00
pidfile test(bazel): runfiles helpers + declared inputs for scan-guard tests (#6828) 2026-09-27 08:24:08 -07:00
proxy fix(dbproxy): wait out a live starter's spawn marker instead of a fixed 5s (#7249) 2026-10-05 08:53:11 -07:00
server fix(doltserver): auto-started dolt must own its port; move a taken bd-chosen port (#7201) 2026-10-04 09:22:03 -07:00
util perf(dolt): pin MaxAllowedPacket in the server DSN to drop a per-connection round trip (#5273 item 4) (#5316) 2026-10-01 01:10:37 -07:00