Mailspring/internal_packages
Ben Gotow d5e04295b2 fix(initial-sync): When an error is encountered, do not start fetching from zero again
Summary:
Previously, when an error was encountered during initial mailbox sync we just started it
over after a retry delay. Recent API uptime issues mean that this was happening often and lots of
people were seeing sync retry many times. This is bad because the app is less performant while
it's syncing mail, and also generates unnecessary load as the app re-fetches threads it already has.

In this diff, there are new specs and functionality in nylas-sync-worker to start fetching
where we left off. This is typically going to be OK because the default sort ordering of the
threads endpoint is newest->oldest, so if new items have arrived since we started fetching
and page boundaries have changed, we'll get duplicate data rather than missing data. Connceting
to the streaming API as soon as we start the sync also ensures that we roll up any changes to
data we've already paginated over.

Test Plan: Run tests

Reviewers: drew, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2132
2015-10-08 19:02:54 -07:00
..
account-sidebar fix(specs): Clean up spec failures due to hot fixes prior to launch 2015-10-05 16:45:30 -07:00
attachments fix(window-serialization): Restore window size, remove cruft from atom.coffee 2015-09-24 10:40:38 -07:00
category-picker switch(env): Move N1 to Nylas production API 2015-10-02 15:01:31 -07:00
composer feat(templates): Final examples package is in - templates! 2015-10-03 14:05:47 -07:00
composer-signature feat(work): Create the "Work" window, move TaskQueue, Nylas sync workers 2015-08-27 16:39:40 -07:00
composer-spellcheck fix(spellcheck): Remove premature optimizations and avoid spellcheck on word being typed 2015-09-11 11:12:25 -07:00
events disable(events): Turn off the events package until it can be polished 2015-10-04 16:57:43 -07:00
feedback feature(feedback): move feedback to a package, indicator for new msgs 2015-10-07 13:55:54 -07:00
inbox-contact-elements fix(drafts): fix illegal ID set 2015-08-31 15:21:41 -07:00
message-list fix(styles): padding fixes 2015-10-05 00:38:48 -07:00
mode-switch fix(mode-toggle): mode toggler now toggles the sidebar rather than the list/split view. fixes T3462. 2015-09-04 12:32:19 -07:00
notification-mailto fix(docs): Replace docs references to Edgehill with N1 2015-09-29 09:45:02 -07:00
notification-update-available rename(Nylas Mail): Replace Nylas Mail > N1 2015-09-29 09:44:30 -07:00
notifications fix(initial-sync): When an error is encountered, do not start fetching from zero again 2015-10-08 19:02:54 -07:00
onboarding fix(auth): Resize the auth window after an update to the token status 2015-10-06 17:58:07 -07:00
plugins actually no more gh-pages 2015-10-05 05:08:53 -07:00
preferences fix(styles): fix fonts in settings and iframe 2015-10-02 17:48:36 -07:00
search-bar fix(specs): fix contenteditable and contact search specs 2015-09-22 16:40:33 -07:00
sidebar-fullcontact fix(message-sidebar): New ContactCard injectable role, updated FocusedContactStore 2015-09-24 18:58:53 -07:00
thread-list feat(archive): shows trash for non-archive accounts 2015-09-30 19:51:48 -07:00
tooltip tweak(tooltip): Fix Sentry 2938 2015-09-10 18:37:15 -07:00
ui-dark rename(Nylas Mail): Replace Nylas Mail > N1 2015-09-29 09:44:30 -07:00
ui-light fix(fonts): update fonts and styles 2015-10-01 17:55:11 -07:00
undo-redo fix(window-serialization): Restore window size, remove cruft from atom.coffee 2015-09-24 10:40:38 -07:00
unread-notifications fix(sounds): make sounds listen to config options 2015-10-02 17:04:15 -07:00
worker-sync fix(initial-sync): When an error is encountered, do not start fetching from zero again 2015-10-08 19:02:54 -07:00
worker-ui fix(developer): visual improvements to developer bar 2015-10-07 17:28:45 -07:00