Mailspring/internal_packages/worker-sync/lib
Ben Gotow 18677e51a6 fix(config): Store cursors with sync state, avoid constant config.cson writes
Summary:
Previously we were storing sync cursors in config.cson. They were by
far the most frequently updated piece of data in config. To make things worse,
all the writing was happening in the worker window - the main window was just
seeing the changes on disk and reloading.

I believe there's an edge case which causes the main window to read the config
file when it's mid-write and empty. This causes the accounts array to become
empty in the AccountStore and lots of downstream issues. It's also then possible
for the main window to write a config change of it's own and empty the file
permanently.

Test Plan: A few new tests to make sure this is backwards compatible.

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2642
2016-02-26 13:52:19 -08:00
..
contact-rankings-cache.coffee
main.coffee feat(mail-rules): Per-account mail rules filter incoming, existing mail 2015-12-23 02:19:32 -05:00
nylas-long-connection.coffee fix(config): Store cursors with sync state, avoid constant config.cson writes 2016-02-26 13:52:19 -08:00
nylas-sync-worker-pool.coffee fix(metadata): update metadata version when processing deltas 2016-02-25 16:20:58 -08:00
nylas-sync-worker.coffee fix(config): Store cursors with sync state, avoid constant config.cson writes 2016-02-26 13:52:19 -08:00
refreshing-json-cache.coffee feat(transactions): Explicit (and faster) database transactions 2015-12-17 11:46:05 -08:00