Mailspring/internal_packages
Ben Gotow 215fa0e4cb 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
category-picker
composer feat(templates): Final examples package is in - templates! 2015-10-03 14:05:47 -07:00
composer-signature
composer-spellcheck
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
message-list fix(styles): padding fixes 2015-10-05 00:38:48 -07:00
mode-switch
notification-mailto
notification-update-available
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
sidebar-fullcontact
thread-list
tooltip
ui-dark
ui-light
undo-redo
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