Real Loss or Stale Read? How to Tell Before You Recreate Missing Data

Date:

Your dashboard says the records are gone. Sometimes they really are. But a system that routinely reports counts wrong by a factor of eight can say the same thing when nothing is missing, so how do you know which kind of “gone” you are looking at, before you act on it?

The short answer: When a remote system reports data missing, two opposite things are possible: it is genuinely lost (recreate it) or the read is stale and the data is fine (recreating makes duplicates). An unreliable system produces both signals, so one alarming read proves nothing. In one incident 29 records were truly gone by evening (a search returned zero, the count was short by exactly 29), yet the same dashboard on other days reported totals wrong eightfold. What distinguished real loss from bad read was a local ledger the remote system could not touch plus arithmetic: the recovered count matched the loss exactly, which caching coincidence would not. Trust the record you control, confirm across time and a second view, and never mass-recreate on one read.

The system of record is the one authoritative store of a fact; a stale read is any view that can report that fact incorrectly because it is cached, replicated, or eventually consistent.

A worked case: 29 records gone by evening

The morning run created 29 records in a third-party system. Every one returned success; the local log recorded 29 creations.

By evening they were gone. Not “looked gone in one place”: gone. A directory search for a record made that morning returned zero matches, and the system’s own roster showed a count 29 short of where the morning had left it. Two independent reads agreed the work was missing.

So it was recreated: 25 of the 29 went back in, each confirmed present immediately after; the rest were already accounted for. Afterward the roster told the whole story at a glance:

  • morning total after creation: 29
  • evening roster: the 29 absent
  • records recreated: 25
  • roster after recovery: 54

Fifty-four is twenty-nine plus twenty-five. The recovered total is fully explained by the original work plus the recovery, which means nothing “came back.” The loss was real, and the recreation was the right call.

The recovered count equalled the loss plus the recreation, exactly. Nothing had returned on its own.

The tempting wrong conclusion

Here is the uncomfortable part, and the trap a reader in the same spot is most likely to fall into.

The first recorded conclusion was the opposite: that the data had not been lost, that the system had merely suffered a transient read glitch, and that the records had reappeared on their own. That note carried a clear instruction to a future reader: do not recreate on a missing read, you will make duplicates.

That conclusion was wrong, and the arithmetic above is what disproves it. If the records had reappeared, the evening roster would have climbed back toward 29 on its own and the 25 recreations would have pushed it to something near 54 with duplicates. Instead the numbers were clean: 29 lost, 25 recreated, 54 total, and, checked weeks later against a full crawl, exactly one record per identity, zero duplicates. The records did not reappear. They were recreated, correctly, once.

The mistake was letting a plausible story (“eventual consistency, it’ll settle”) override the ledger. The ledger was right the whole time.

A plausible explanation that contradicts your own arithmetic is a story, not a diagnosis.

Why both readings were credible

What makes this genuinely hard, and not just a lesson in carelessness, is that the “transient glitch” theory was not stupid. The same system’s read layer is unreliable, and the evidence proves it.

On other runs, the roster reported 20 users while the local ledger held 165. It reported 80 one minute and 201 the next, with no writes in between. Those are not real changes; they are a read layer serving stale or partial views. Anyone watching those numbers learns, correctly, that a low read is often a lie.

So the environment trains you to distrust exactly the signal that, this one time, was telling the truth. That is the core difficulty: a system that usually lies about loss can still, sometimes, actually lose your data — and the two cases present identically in a single glance.

A system full of false alarms trains you to distrust the one signal that, this time, is true.

How to tell them apart before you act

The resolution is not “trust the system” or “distrust the system.” It is to stop relying on the untrustworthy view for a decision this consequential.

  1. Keep a local ledger the remote system cannot touch. The one artifact that survived the wipe was the local record of what had been created. It is the anchor every other decision hangs from; without it, “is this loss real?” has no reference point. This is the same instinct as trusting the authoritative store over a cached count: the number you can reconstruct beats the number you are shown.
  1. Confirm across time and a second view. A single read is an opinion. The loss here was believed only after a search and a roster count agreed, and stayed agreed. When the two disagree, or one settles on a re-check, you are looking at a stale read, not a loss.
  1. Do the arithmetic, and let it overrule the story. Counts that add up cleanly (loss + recovery = total, no remainder) confirm a real loss; counts that overshoot reveal duplicates from acting too soon. The math is a harder authority than any narrative about consistency.
  1. Never mass-recreate on one read. The expensive failure mode is recreating on a false alarm and doubling your data. The check that makes recreation safe is checking each item, one at a time, in the store that holds the authoritative copy. Reconcile before you recreate, recreating only the genuinely absent and verifying each after.

What the ledger cannot do

A local ledger tells you what should exist; it cannot, by itself, tell you what does exist in the remote system at this instant. That still requires a read, and the read is the unreliable part. The ledger’s job is narrower and vital: it converts an unanswerable question (“is this loss real?”) into an answerable one (“does the authoritative store match my record, confirmed twice?”). It also cannot prevent the loss; nothing here would have stopped a downstream wipe. What it prevents is the second disaster: the duplicates you create by reacting to the first one badly. Detecting the loss and reacting safely are different problems, and only the ledger-plus-arithmetic discipline solves the second.

A record a check flags as wrong is often the same illusion in another guise: the code moved ahead of a stored copy an incremental gate skipped, not corruption; see The fix that didn’t take.

The short version

Twenty-nine records created in the morning were genuinely gone by evening; a search and a roster count agreed, and recreating 25 of them (the rest already present) was correct — proven because the resulting total, 54, was exactly 29 plus 25, with zero duplicates on a later full crawl. The first conclusion had been the opposite (a transient read glitch, records “reappeared”, do not recreate), and it was wrong, overturned by that arithmetic. The reason both readings were credible is that the system’s read layer genuinely is unreliable (it reported 20 against a real 165, and 80 then 201 with no writes). The discipline that resolves it: keep a local ledger the remote system cannot touch, confirm across time and a second view, let the arithmetic overrule the story, and never mass-recreate on a single read.

Frequently Asked Questions

What if I never kept a local ledger?

Rebuild the best reference you can before you act. Your own job logs, the create responses you stored, or the source data the records were made from can all stand in for a ledger, as long as the remote system can’t alter them. If none of that exists, you can’t prove a loss; you can only gather evidence. Take repeated reads over time and through more than one view, recreate one record at a time with an existence check right before each create, and start writing a ledger from that run onward.

I already recreated everything and now have duplicates. How do I clean up?

Group the remote records by the key that identifies one real entity, keep one record per key, and remove the extras, checking each group by hand where the copies differ. Then record what you kept in a local ledger so the next scare has an anchor. The same key and ledger let any future re-run skip what already exists; Reconcile before you recreate covers that design.

Share post:

Subscribe

Popular

More like this
Related

WooCommerce Search by SKU or ISBN Finds Nothing? It Never Looks There

A shopper types the SKU from your catalog, or the ISBN printed on the back of a book, and gets "No products were found". The product is right there, and the number is on its page. Search simply never reads that part of the product.

Computer Slow but CPU and Memory Look Normal? Check the Handle Count

Chrome takes a minute to open, or doesn't open at all. Every click waits. You open Task Manager expecting to find the culprit, and it tells you everything is fine. Here is the number that isn't, and the fix that takes two minutes.

Kernel-Power 41 Tells You Your PC Restarted, Not Why

Your PC restarts with no blue screen, and the only clue is a critical event saying it didn't shut down cleanly. Here is how to get from that event to a short list of suspects.

Set Up WordPress SMTP Without a Plugin, Even on a Multisite Network

WordPress mail goes out as wordpress@ your domain, from the web server, and lands in spam. An SMTP plugin fixes that. So do about twenty lines of code, and on a network of sites the code can give every site its own mailbox and its own password.