You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-08-31] fix: read one effective update watermark everywhere so the missing-updates fetch can advance #98984
The client tracks the last update ID it has saved to disk. When a Pusher event arrives from further ahead than that, the client knows it missed a stretch of updates and fetches them. It then throws that answer away: the fetch asks from the number on disk, but the check that accepts the answer reads a higher number, one that also counts WRITE updates staged in memory for the deferred flush. Against that higher number the answer looks like something the client already has, so apply() drops it.
Nothing moves after that. The number on disk stays put, so the next Pusher event finds the same gap, fires the same fetch from the same place, and drops the same answer. The write queue is paused while a gap is open, so the user's messages and expenses sit on the device. The staged marker that caused the drop only clears on flush, the flush needs the queue unpaused, and the queue unpauses only after the gap closes — nothing inside that circle can break it.
In production on 2026-08-18, across up to 46,000 accounts, clients discarded 28,620 GetMissingOnyxMessages ranges and 63,679 ReconnectApp ranges, 92,299 per day in total. Each one is a response the client asked for, received, then dropped without saving.
Solution
A catch-up response is now judged against the number on disk, the same number the fetch was sent from. A catch-up means GetMissingOnyxMessages, or a ReconnectApp carrying updateIDFrom. Every other response keeps the check it had, and a catch-up that genuinely trails what is on disk is still dropped.
The update manager, the deferred-update utils and the stall guard all read both numbers through a single getEffectiveLastUpdateID(), so the fetch and the check can no longer disagree. Two regression tests cover it — they fail on main and pass here — and the old should not escalate or back off when the fetch response reports progress test is replaced, because it asserted that a response ahead of the client counts as progress, which is always true when a gap exists and is exactly the contract this PR fixes.
changed the title [-]fix: read one effective update watermark everywhere so the missing-updates fetch can advance[/-][+][Due for payment 2026-08-31] fix: read one effective update watermark everywhere so the missing-updates fetch can advance[/+]on Aug 24, 2026
Activity
melvin-bot commentedon Aug 20, 2026
@mountiny — to hire @dmkt9 on Upwork, add the External label so a job is created and the offer is sent automatically.
[-]fix: read one effective update watermark everywhere so the missing-updates fetch can advance[/-][+][Due for payment 2026-08-31] fix: read one effective update watermark everywhere so the missing-updates fetch can advance[/+]8 remaining items
melvin-bot commentedon Aug 28, 2026
@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Aug 30, 2026
Payment Summary
Resolving PRs:
fix: read one effective update watermark everywhere so the missing-updates fetch can advance #98777
Contributor: @adhorodyski does not require payment (Contractor)
Assignee: @dmkt9 requires payment (Needs manual offer from BZ)
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 1, 2026
Payment Summary
Contributor+: @dmkt9 paid $250 via Upwork
dmkt9 commentedon Sep 2, 2026
@mallenexpensify I'm still receiving payments through Upwork.
mallenexpensify commentedon Sep 3, 2026
@dmkt9 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022095308120148753449
dmkt9 commentedon Sep 3, 2026
@mallenexpensify Thanks. I've accepted the offer
mallenexpensify commentedon Sep 3, 2026
@dmkt9 paid, summary updated above. Thx.