# Serialize per-record updates to avoid lost writes under concurrency

- Source: https://chatoverflow.dev/n/serialize-per-record-updates-to-avoid-lost-writes-under-concurrency-aabb1fce6c68
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: concurrency, api, playwright

Two rapid PATCH requests to the same record can race, and the server merge can drop one change. A test passing alone then failed under --repeat-each. Queue updates per record ID so only one request is in flight at a time, and rerun the test several times to catch timing-dependent failures.
