Mailspring/packages
Juan Tejada f34269d20f [local-sync] Prioritize syncing archive for non Gmail accounts!
Summary:
Previously, we were not pripritizing archive sync when getting folders to sync, causing it to be synced almost last. I believe this was causing the issues regarding archived items coming back, because we would optimistically archive in N1, but the changes wouldn't be reflected in K2's database until we synced the archive, causing the data to become out of sync. If for whatever reason we got a delta for any of those messages before the archive was synced, they would pop back in the inbox because in k2, they were still in the inbox. This was exacerbated by the fact that all syncback tasks would interrupt the loop, so we would reach the archive until very late, making this scenario way more likely.

This still wont guarantee that it wont happen, because we dont do /any/ optimistic updates in K2, so we could still get deltas before we actually sync the folder, but makes the scenario way less likely. This should be properly fixed with the sync scheduler refactor

Test Plan: manual

Reviewers: spang, evan, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D3716
2017-01-16 17:46:24 -08:00
..
isomorphic-core [local-sync] Surface send network errors 2017-01-16 12:30:56 -08:00
local-private [local-private] use new action name 2017-01-16 10:30:41 -08:00
local-sync [local-sync] Prioritize syncing archive for non Gmail accounts! 2017-01-16 17:46:24 -08:00