pingqiuandClaude Opus 5.5 9302f31e48 storage: cut barrier pause counts the lock wait; report LockWaitNs (#216 follow-up P2)
BarrierPauseNs started after captureMu.Lock returned, so the wait for
writers already holding the capture barrier shared (e.g. parked in WAL
admission) was not counted, although a pending Lock already blocks new
writers: the reported guest pause understated it.

The pause is now timed from the Lock request, and LockWaitNs reports the
wait for the shared holders on its own (also in the /chunk/cut body).

Tests: a cut whose barrier is held shared for 300 ms reports a pause that
includes the wait (red on main: about 24 ms) and a LockWaitNs of about the
hold, inside the pause before the sync. Three declared mutants (pause timed
after the Lock, lock wait unset, body drops the field) each turn exactly
their declared tests red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:47:49 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%