sync bug

zeppo's Avatar

zeppo

24 Oct, 2016 02:43 AM

yesterday iphone app iCloud sync was shut down when I opened it to do some studying while waiting for a traffic light. Switched it back on and resumed. Then today, it shut down again while I was away from the house. But I forgot to switch the sync back on this time which I think is where the bug comes in. If you don't switch it back on and establish the sync again with the cloud before you use the mac app again, it ends up ignoring any scheduling that has been synced to the cloud and keeps instead what is on the mac app. I hadn't used the mac app in a couple of days and so it had 167 due notes. But instead of grabbing the scheduling from the cloud that was synced to it the last few days from the iphone app, it instead pushed the mac scheduling to the cloud. So as a result when I switched back iphone app, it now has 167 notes due.

This same scenerio has happened to me multiple times. If I don't remember to turn on the iphone sync prior to using the mac app, it ignores days worth (however many have passed since the mac app was last used) of studying on the iphone that would have been synced to the cloud in favor of whatever is scheduled by the mac app.

So now I have to "re-study" 167 notes, and just try to remember which ones I got wrong so as to keep the algorithm accurate.

  1. Support Staff 1 Posted by drewmccormack on 24 Oct, 2016 06:52 AM

    drewmccormack's Avatar

    When you add a new device to the sync, such as when it stops syncing for a few days with the switch off, the due status is not really determined. The apps have two different due states, and have to make a choice. They can only do this properly if the notes have been syncing, and tracking their changes for sync. If sync was off, that sync data is not available, and they just choose between the two options.

    You study history should be preserved. So if you study on the iPhone when sync is turned off, and then turn on sync, you should still see the iPhone's study event.

    Something to try is using Note > Update Status of All Notes. It may resolve any issues that have arisen if there are any.

    Note that it may also not be a bug as such. Imagine you study 165 notes with facet A before facet B. Then you sync. After the sync, you may see 160 odd notes with facet B before facet A. Studies considers these independent for scheduling. So it doesn't necessarily have to be a problem.

    In general, if you want the scheduling to work consistently, you are best to try to keep the sync switch on. This means the app will be storing extra sync data, that allows it to merge with data on other devices. Turning it off for a number of days means it has to merge very old data with newer, deciding what to keep. This is actually not a completely tractable problem, so it has to 'guess' at things. With sync on, even if the device is offline, at least it is storing details that will help order events when merging.

    Kind regards,
    Drew

  2. drewmccormack closed this discussion on 24 Oct, 2016 06:52 AM.

  3. zeppo re-opened this discussion on 24 Oct, 2016 12:06 PM

  4. 2 Posted by zeppo on 24 Oct, 2016 12:06 PM

    zeppo's Avatar

    To me, the bug is that it shouldn't have to randomly "choose" which scheduling to keep. It should choose the one that with the least overdue notes. Seems like this would be simple to achieve, but I don't program apps, so what do I know.

    This has happened enough that I know this is not a case of swapping which facet has scheduled as a prompt. I had studied all my due notes (of 51 scheduled for the day) on the iphone before I switched back on the icloud. My mistake, after having this happen a number of times before and knowing how the opening the imac app before I switched back on the iphone sync. It has happened enough that I know that I need to switch the iphone sync back on before i ever open the imac app again, or else the sync will screw up and keep the older imac data and move it to the iphone (even though it is more up to date with no overdue notes). That is the work around (keep mac app closed until turning back on iphone sync). But occassionally I forget, and it seems to me the work around should be unnecessary if you would just program it to keep the data on the device with the fewest overdue notes-- EDIT- actually, I didn't think that through, it wouldn't be the fewest overdue notes, but the oldest overdue notes.

  5. drewmccormack closed this discussion on 25 Oct, 2016 06:39 AM.

  6. zeppo re-opened this discussion on 16 Nov, 2016 12:59 AM

  7. 3 Posted by zeppo on 16 Nov, 2016 12:59 AM

    zeppo's Avatar

    The sync problem is back again. I believe it has been three days since I last opened the mac app. After studying today's due notes on the iphone, the cloud sync took a rather long time to complete. Then a couple of minutes after the sync oompleted, I get a pop up saying:

         "A cloud data reset must be performed on all devices. To avoid data corruption, a reset should be performed on each device. It is also advisable to wait 30 minutes after resetting all devices before enabling sync again."

    Then it gives the options "Don't Reset" or "Reset Cloud".

    I have yet to open the mac app to reset the cloud, nor have I yet selected from the above options.

    Is there a certain order in which I need to do this to ensure that the iphone study history data is kept instead of the mac data?

  8. Support Staff 4 Posted by drewmccormack on 16 Nov, 2016 08:15 AM

    drewmccormack's Avatar

    In theory, the whole study history should be merged together. Unfortunately, you may find some differences in due count after the merge.
    There is no way to force an order of merging.

    Thanks for reporting it. It seems we get much less reports of this, so hopefully it is not more rare.

    We just released a fix for the Mac a few days back which may help this problem a bit too.

    Kind regards,
    Drew

  9. 5 Posted by zeppo on 17 Nov, 2016 02:42 AM

    zeppo's Avatar

    How about if I delete the mac app, then reinstall it 30 minutes after I turn the sync back on with the iphone app?

  10. Support Staff 6 Posted by drewmccormack on 17 Nov, 2016 07:14 AM

    drewmccormack's Avatar

    No, the sync doesn’t work like that. Because the data on each device is ‘timeless’, ie it has not known time that it was made, it is considered to have always been there. So both devices have data that has always been there, and the way it is merged is arbitrary. For most things, there is no conflict, but for due status there could be.

    Drew

  11. Support Staff 7 Posted by drewmccormack on 17 Nov, 2016 07:18 AM

    drewmccormack's Avatar

    The one way you could probably ensure that you get only the iPhone data is to completely remove the Mac data.

    You would have to:

    1. Reset the cloud data
    2. Delete or Move aside the Mac data. You can use the Go to Folder in Finder with ~/Library/Containers to find the data folder. It is called com.mentalfaculty.studies.mac. Drag that to the desktop and restart your mac.
    3. Wait 20 minutes
    4. Turn on iPhone sync, and wait for upload (2 full sync cycles)
    5. Turn on Mac app. Should be empty. (Don’t import Mental Case data)
    6. Turn on sync in Mac app
    7. Wait for it to download

    This should just give you the data from the iPhone.

    If anything goes wrong, you can put the Mac data back where you found it in (2), and restart your Mac.

    Drew

  12. 8 Posted by zeppo on 18 Nov, 2016 04:32 AM

    zeppo's Avatar

    This appears to have worked.

  13. drewmccormack closed this discussion on 18 Nov, 2016 02:14 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac