Files
Naiyuan Qing 78789e8da8 fix(comments): lock thread root to serialize concurrent resolves
Under READ COMMITTED, two concurrent resolves of different comments in
the same thread could each miss the other's uncommitted resolution in
ClearOtherThreadResolutions and commit two resolved rows. Take a FOR
UPDATE lock on the thread root in its own statement before clearing, so
the loser blocks and its clear re-runs on a fresh snapshot that sees the
winner's committed resolution.

Also updates the stale loadCommentForActor docstring that still
described the backend as a plain setter with frontend-derived
resolution — the single-resolution invariant is now enforced on write.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 14:30:01 +08:00
..