yu1128-L 85796f6492
fix(events): preserve thread seq watermark across run deletion (#6477)
* fix(events): preserve thread seq watermark across run deletion

* fix(events): clean up watermarks for empty threads

* perf(events): avoid duplicate fence on run deletion

delete_by_run already reaches _max_seq_for_thread, which acquires the transaction-scoped thread mutation fence. Keep the count and delete under that same transaction lock without taking the Postgres advisory lock twice, and pin the single acquisition in the existing test.

---------

Co-authored-by: yu1128-L <296164533+yu1128-L@users.noreply.github.com>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-08 20:29:15 +08:00
..