Debugging Database Consistency Bugs
How to trace query consistency issues across repositories, replicas, and API response contracts.
Pattern
The database state is technically valid, but the read path uses the wrong scope, filter, cursor, or replica.
warningSymptoms
- arrow_rightDeleted rows appear
- arrow_rightRecords repeat across pages
- arrow_rightFresh writes return 404
- arrow_rightEmpty collections become errors
searchWhere to look
- arrow_rightRepository filters
- arrow_rightCursor construction
- arrow_rightReplica routing
- arrow_rightResponse helper semantics
buildCommon fixes
- arrow_rightCentralize query invariants
- arrow_rightUse stable cursor ordering
- arrow_rightRoute read-after-write flows consistently
- arrow_rightTest empty and deleted states
Practice challenges
No ready practice incident is mapped yet.