By Relwick · Published
A saved change can appear to disappear when the next screen reads from a database replica that has not caught up.
A resume entry becomes clearer when it shows that sequence and the specific consistency requirement your work addressed.
Quick answer & key takeaways
Describe the action that wrote data and the following read that could reach a replica before the change was visible there. Explain the consistency behaviour you implemented for that workflow, such as routing the relevant read appropriately. Include a test with delayed replication and state the limits of the guarantee. Do not claim that every stale result is a cache defect or that all replicas are always current.
- Separate successful persistence from visibility on another database.
- State which reads received the consistency treatment.
- Test the delayed-replication case, not only the fast path.
Describe the observed sequence
Start with the user action: an update succeeds, a redirect loads a detail view, and that view shows the previous value. Identify the actual data source for each operation before attributing the behaviour to replication.
PostgreSQL’s hot-standby documentation explains that changes take time to arrive from the primary, so a standby can lag. This establishes why a successful primary write and a later replica read are not automatically a read-your-writes guarantee.
Make the consistency scope explicit
| Question | Evidence to retain |
|---|---|
| Which read required fresh data? | The specific screen or operation after the write. |
| How was that read routed? | The implemented policy and its boundaries. |
| What happened when the preferred source failed? | The agreed fallback behaviour. |
| Which reads still used replicas? | The remaining eventual-consistency scope. |
Avoid presenting a short routing window as a mathematical guarantee for every possible delay unless the system actually provides one. Explain the policy your application uses and how exceptional conditions are handled.
Write the bullet around correctness
A fictional example is: “Corrected stale order details after successful edits by adjusting post-write read routing and testing the workflow under simulated replica delay.” It names a symptom, intervention, and meaningful verification.
Keep the scope specific. Routing an individual workflow does not mean you redesigned the replication system. Similarly, adding a delay to a test does not prove that production replication latency improved; it demonstrates how the application behaves when freshness is delayed.
If you measured a performance tradeoff, record it separately. Moving reads may change primary workload. An honest entry can acknowledge the bounded correctness improvement without claiming both universal consistency and free performance gains.
Prepare the explanation for review
Use a small sequence diagram with synthetic identifiers to show the write, replication, and read paths. Include the failing order of events and the corrected behaviour. Protect database addresses, credentials, and customer records in any shared evidence.
Place the bullet under the relevant role in Resume Studio. A related cache invalidation example covers a different cause of stale data; choose the explanation that matches your actual investigation.
Frequently asked questions
Is every stale result caused by replica lag?
No. Caches, transaction behaviour, application state, and other causes require separate investigation.
Can I call a routing fix a replication performance improvement?
Only if you actually changed and measured replication performance. Read routing is a different contribution.
What is the most useful regression scenario?
The original write-followed-by-read sequence with replication delayed enough to expose the defect.
Sources and further reading
- PostgreSQL: hot standby — Explains standby query operation and the delay before primary changes arrive on a standby.
Summary
Explain where the fresh value existed and where the next read went. That distinction makes the correctness work understandable and verifiable.