Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › data consistency

The Sync Conflict That Quietly Ate a Year of Highlights—and the Row That Fixed It

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A highlight can disappear after a device reconnects without showing an error or asking which version to keep. In Andy Stanly’s account of a production sync bug, the cause was a hidden mismatch: the server ordered changes by when it received them, not when the reader made them. A revised row-ordering rule helped, but older rows without timestamps and devices with incorrect clocks remained limits.

How an offline change became the newest change

Stanly designed highlights to remain usable offline and synchronize later across devices. The original policy treated each highlight as a last-write-wins register: a server-assigned, increasing server_seq determined which update prevailed.

As an Amazon Associate I earn from qualifying purchases.

Consider two devices sharing a highlight. Device A goes offline for a week. While A is disconnected, Device B synchronizes changes. When A reconnects, the server assigns fresh sequence numbers to A’s queued edits. Those numbers are new because the server has only just received the edits—not because the user made them more recently. A later sync from B can receive still newer sequence numbers and overwrite A’s changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That is the ordering mistake at the center of Stanly’s account. A server sequence records server arrival or processing order. On its own, it cannot reveal the intended order of edits made on disconnected devices. As Stanly puts it, “The server sequence is a fact about when the server heard about the change, not about when the change happened.” Stanly’s incident account

#1 Best Overall
Amazon Kindle 16 GB (2024 model) - Light and compact, with fast page turns, and high contrast ratio - Matcha
  • Light and compact - With adjustable brightness, high contrast ratio, and fast page turns.
  • Effortless reading in any light - Read comfortably with a 6“ glare-free display, adjustable front light—now 25% brighter at max setting—and dark mode.
  • Escape into your books - Tune out messages, emails, and social media with a distraction-free reading experience.
  • Read for a while - Get up to 6 weeks of battery life on a single charge.
  • Take your library with you – 16 GB storage holds thousands of books.

Why a deleted highlight could be hard to recover

Deletes complicated the conflict. Stanly describes a queued delete marking a row deleted, followed by another device briefly resurrecting it; another synchronization cycle could then make the tombstone prevail again. To the reader, the result could look like a highlight had simply vanished, with no conflict prompt explaining the competing edits.

Stanly reports that a production query found 41,208 rows with deleted_at IS NOT NULL, and that the most affected user had 412 tombstones. These are the author’s reported figures; they are not independently verified measurements or estimates of how common this problem is in other apps. The account says soft-deleted rows let Stanly run a one-off restoration script that recovered many highlights, but it does not claim every missing highlight was restored. Stanly’s incident account

Rank #2
Amazon Kindle Paperwhite 16GB (2024 model) – 7" glare-free display and weeks of battery life – Black
  • Kindle Paperwhite – 7“ Paperwhite display with high contrast ratio and fast page turns.
  • Ready for travel – The ultra-thin design has a larger glare-free screen so pages stay sharp no matter where you are.
  • Escape into your books – Your Kindle doesn’t have social media, notifications, or other distracting apps.
  • Battery life for your longest novel – A single charge via USB-C lasts up to 12 weeks.
  • Read in any light – Adjust the display from white to amber to read in bright sunlight or in the dark.

The row-ordering change Stanly made

Stanly says the revised comparison used a client timestamp captured when a change was made. For colliding writes, the later timestamp won; the server sequence served as a deterministic fallback when timestamps tied. This changes the ordering signal from server receipt time to the recorded time of the edit, while retaining a consistent tie-breaker.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To reduce the effect of implausible client times, Stanly also says incoming timestamps were clamped to a plausible range around server time, with out-of-range writes logged. Those are implementation choices in this incident account, not a universal recipe or a guarantee that timestamps settle every conflict. Stanly reports that eleven out-of-range timestamps appeared over two months and attributed them to one model of low-cost Android tablet; the time window and device attribution are not independently verified. Stanly’s account of the change

Rank #3
Amazon Kindle 16 GB (2024 model) – Light and compact, with fast page turns, and high contrast ratio – Black
  • Light and compact - With adjustable brightness, high contrast ratio, and fast page turns.
  • Effortless reading in any light - Read comfortably with a 6“ glare-free display, adjustable front light—now 25% brighter at max setting—and dark mode.
  • Escape into your books - Tune out messages, emails, and social media with a distraction-free reading experience.
  • Read for a while - Get up to 6 weeks of battery life on a single charge.
  • Take your library with you - 16 GB storage holds thousands of books.

What the fix could not settle

A badly incorrect device clock can still make the edit order uncertain: a timestamp-based policy can trust a misleading time. The approach also could not fully restore older rows that lacked timestamps. Stanly’s report is a specific engineering account, not an independently audited case study; it does not establish that all lost highlights were recovered or that the same policy is right for every sync system. Stanly’s account of the change

How to think about conflicts in another sync system

There is no single conflict policy that suits every kind of data. Offline Protocol distinguishes last-writer-wins, retaining versions for a user to choose between, automatic merging, and authority-based decisions. When reviewing a design, the practical questions are:

Rank #4
Kobo Clara Colour | Colour eReader | 6” Glare-Free Colour E Ink Kaleido™ 3 Display | Dark Mode Option | Waterproof | Audiobooks | 16GB of Storage | White
  • 𝗕𝗥𝗢𝗪𝗦𝗘 𝗔𝗡𝗗 𝗥𝗘𝗔𝗗 𝗘𝗕𝗢𝗢𝗞𝗦 𝗜𝗡 𝗙𝗨𝗟𝗟 𝗖𝗢𝗟𝗢𝗨𝗥 - Read in colour with a 6” E Ink Kaleido 3 display to enjoy eBook covers, comics, graphic novels, illustrations, and more.
  • 𝗡𝗢 𝗠𝗢𝗥𝗘 𝗛𝗨𝗡𝗧𝗜𝗡𝗚 𝗙𝗢𝗥 𝗛𝗜𝗚𝗛𝗟𝗜𝗚𝗛𝗧𝗘𝗥𝗦 - With multiple colours available at the touch of a finger, you can highlight your eBooks. Add, erase, or change colours as you go, and easily see all your highlights by chapter at a glance
  • 𝗬𝗢𝗨𝗥 𝗘𝗬𝗘𝗦 𝗪𝗜𝗟𝗟 𝗧𝗛𝗔𝗡𝗞 𝗬𝗢𝗨 – ComfortLight PRO automatically reduces blue light throughout the day, and you can personalize your reading settings via font size, line spacing, or even Dark Mode
  • 𝗪𝗔𝗧𝗘𝗥𝗣𝗥𝗢𝗢𝗙 𝗙𝗢𝗥 𝗥𝗘𝗔𝗗𝗜𝗡𝗚 𝗔𝗡𝗬𝗪𝗛𝗘𝗥𝗘 – Full waterproof protection and meets requirements of IPX8 rating – waterproof for up to 60 minutes in up to 2 metres of water
  • 𝗕𝗘𝗧𝗧𝗘𝗥 𝗕𝗬 𝗗𝗘𝗦𝗜𝗚𝗡 - Made with recycled and ocean-bound plastic and repairability to waterproof protection
  • Offline use: Can people continue working while disconnected, and what happens to queued edits when they reconnect?
  • Ordering: Does the chosen signal represent edit time, server arrival, or some other authority—and what happens when devices disagree?
  • Version survival: Are competing versions retained for review, or does one replace the other immediately?
  • Merge safety: Can the data type be merged without silently changing its meaning?
  • Deletes: How are tombstones retained, synchronized, and prevented from causing confusing resurrection or loss?
  • Visibility and recovery: Are sync errors recorded, reviewable, and retryable, and is there a recovery path for data that cannot be reconciled automatically?

Microsoft Dataverse provides one official example of making sync errors visible: its documentation describes recording errors in a table with review and retry workflows. That illustrates an operational option, not a rule for every application. Offline Protocol’s conflict strategies; Microsoft Dataverse sync-error documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Further reading

For a broader treatment of conflicting writes, unreliable clocks, sync engines, and local-first software, see Designing Data-Intensive Applications, 2nd Edition, by Martin Kleppmann and Chris Riccomini. O’Reilly’s listing covers those topics, and Kleppmann’s publications page lists the edition as published by O’Reilly in March 2026. It is background reading, not a requirement for implementing Stanly’s specific change. O’Reilly book listing; Martin Kleppmann’s publications page

Quick Recap

Bestseller No. 1
Amazon Kindle 16 GB (2024 model) - Light and compact, with fast page turns, and high contrast ratio - Matcha
Amazon Kindle 16 GB (2024 model) - Light and compact, with fast page turns, and high contrast ratio - Matcha
Light and compact - With adjustable brightness, high contrast ratio, and fast page turns.; Read for a while - Get up to 6 weeks of battery life on a single charge.
$149.99
Bestseller No. 2
Amazon Kindle Paperwhite 16GB (2024 model) – 7' glare-free display and weeks of battery life – Black
Amazon Kindle Paperwhite 16GB (2024 model) – 7" glare-free display and weeks of battery life – Black
Battery life for your longest novel – A single charge via USB-C lasts up to 12 weeks.
$199.99
Bestseller No. 3
Amazon Kindle 16 GB (2024 model) – Light and compact, with fast page turns, and high contrast ratio – Black
Amazon Kindle 16 GB (2024 model) – Light and compact, with fast page turns, and high contrast ratio – Black
Light and compact - With adjustable brightness, high contrast ratio, and fast page turns.; Read for a while - Get up to 6 weeks of battery life on a single charge.
$149.99
Bestseller No. 5
Amazon Kindle Paperwhite 16GB (2024 model) – 7' glare-free display and weeks of battery life – Jade
Amazon Kindle Paperwhite 16GB (2024 model) – 7" glare-free display and weeks of battery life – Jade
Battery life for your longest novel – A single charge via USB-C lasts up to 12 weeks.
$199.99
Best Value
Amazon Kindle Paperwhite 16GB (2024 model) – 7" glare-free display and weeks of battery life – Jade
  • Kindle Paperwhite – 7“ Paperwhite display with high contrast ratio and fast page turns.
  • Ready for travel – The ultra-thin design has a larger glare-free screen so pages stay sharp no matter where you are.
  • Escape into your books – Your Kindle doesn’t have social media, notifications, or other distracting apps.
  • Battery life for your longest novel – A single charge via USB-C lasts up to 12 weeks.
  • Read in any light – Adjust the display from white to amber to read in bright sunlight or in the dark.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

data consistencylocal-first softwareoffline syncsoftware engineeringsync conflicts

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.