Mailspring/internal_packages/worker-sync
Ben Gotow 5691fc88ca 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
..
lib fix(config): Store cursors with sync state, avoid constant config.cson writes 2016-02-26 13:52:19 -08:00
spec fix(config): Store cursors with sync state, avoid constant config.cson writes 2016-02-26 13:52:19 -08:00
package.json fix(license): GPLv3 => GPL-3.0 2015-12-07 10:50:47 -08:00