A Small Fix · Debug Season · Pulse Beat
It was nine lines long. He deleted the assumption, rewrote the merge to match pages by their own id instead of by position, and added a check that refused to write a page into an account that did not…
It was nine lines long.
He deleted the assumption, rewrote the merge to match pages by their own id instead of by position, and added a check that refused to write a page into an account that did not own it. It took forty minutes. He ran the old data through the new code and it came out clean.
He did not trust it. He had learned, in four years of logistics, that the fix that comes quickly deserves the longest suspicion. He wrote a test that filled a database with a thousand fake accounts, deleted every seventh, ran the sync a hundred times, and checked that no page ever left its owner. It passed. He made it harder: a million pages, a clock that jumped, a crash in the middle. It passed.
At two in the morning he did what he always did, and sat watching the log. At 02:17:04, nothing happened. He sat through 02:18, 02:19, the dull small hours. Then, finally, he sat back and let out a breath that felt as if it had been held for nine days.