mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-23 00:36:50 +08:00
07d576d5f4
Summary: Previously, every time our NylasLongConnection changed its status to `connected`, we would reset our backoff scheduler, assuming that every time our status changed to `connected` it meant that we would not receive any errors. However, if our backend is down or overloaded (or returning 401s like in our recent outage), we would do the following: 1. Establish connection, change status to `connected` 2. Reset backoff scheduler 3. Receive error 4. Close connection 5. Schedule next retry using backoff scheduler. Delay will be 1s or less, because scheduler was reset in 2. 6. Retry after delay, 7. Repeat from 1., ad infinitum This caused us to consistantly hammer our servers and render our exponential backoff useless. This commit makes it so we conly reset the backoff scheduler when we actually receive deltas, and increments the max backoff to 10 minutes Test Plan: run against local n1Cloud, manually return 401s from the api, verify that we didn't backoff at all before this diff, verify that we backoff correctly after this diff Reviewers: mark, spang, halla Reviewed By: mark, spang, halla Differential Revision: https://phab.nylas.com/D4401 |
||
---|---|---|
.. | ||
client-app | ||
client-sync | ||
isomorphic-core | ||
README.md |
Monorepo Packages
Each folder here is designed to act as its own repository. For development convenience, they are all included here in one monorepo. This allows us to grep across multiple codebases, not use submodules, and keep a unified commit history.
We use Lerna to manage the monorepo and tie
them all together with the main nylas-mail-all/scripts/postinstall.es6
script,
which in turn, calls lerna bootstrap