Re-enable NoteDoctor to sync notes on startup - #3388
Conversation
NoteDoctor scans for local/ghost discrepancies on idle and queues sync attempts. It was disabled during the 2020 rewrite and never turned back on.
|
My memory is weak on this, but my guess is that we turned off the Since it adds new concurrency work I would be hesitant to re-enable it without a clear justification so that we can avoid any potential backfiring. What led you to believe it was necessary again? |
|
Thanks for having a look at these PRs!
Sorry, I forgot to mention this in the PR body 😅 In detail: When a user has a sync that failed to sync (e.g. 413) and starts up Simplenote, the note won't try to sync again without the This became more obvious with #3387. If you're not convinced of |
this seems problematic. why does it not try again? it should have a local copy of the note that doesn’t match what’s on the server. is there another bug this is hiding? |
Yep, it does have the local copy, and the I had another look into
|
#3388 tries to re-enable the NoteDoctor which retries (among other things) failed syncs. After looking into it a bit deeper, I think the risk of the NoteDoctor messing up data is too high. Without the NoteDoctor we had the following: - Sync fails due to some error - User restarts Simplenote - Note with failed sync showed as pending NoteDoctor solved this by actually syncing the note again. If it fails again we then show the error. With this commit we instead just sync the error state, so when the app is reopened the user still sees the error and can then take action.
NoteDoctor scans for local/ghost discrepancies on idle and queues sync attempts. It was disabled during the 2020 rewrite and never turned back on. Looks to me like it was just forgotten in the already very complex rewrite, but please correct me if I'm wrong @dmsnell. The doctor would be quite useful in combination with #3387.
Fix
Uncommented code and added some automated tests.
Release
Other changes: