Developer explains how a wall-clock sync bug silently overwrote users' notes
A developer discovered a flaw in their notes app's sync logic after a conflict erased a note written on an offline phone, replacing it with a later laptop edit. The app used SQLite on each device and resolved sync conflicts by keeping whichever version carried the larger Unix timestamp. Because the phone was offline when its note was written, its timestamp was older than the laptop's, even though the phone edit had occurred first in real time. The bug had gone unnoticed for over a year because most users operated on a single device, but a new reading-plans feature drove a surge in multi-device note editing. The developer had previously documented the limitation in a code comment, intending to revisit it if multi-device usage grew — a condition that was eventually met, not by a planned review, but by user complaints.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in