If you have multiple users or multiple devices, stuff you type can be deleted without chance of recovery! If this matters to you, please Like this post!
Steps to reproduce
- Create an empty node, and sync.
- Go to a second computer, sync.
- Disconnect from the network. With that same computer, edit that node, say typing:
- a
- b
- paste a TON of stuff here.
-
Back to the first computer, delete that empty node.
-
Back to the second computer, reconnect to the net, and sync.
Understand, the sequencing in practice might not be intended. It could be the result of simply working with 2 devices concurrently, and having a momentary internet disruption.
Actual result
The entire tree vanishes. Depending on the sequence of events, the vanished tree may not appear in the version history of the document.
At first, this might seem logical, but it is clearly not the intent of the two users viewed in isolation. Also, deleting an empty node was never intended to delete future development of an empty node into relevant data.
Expected result
I expect those edits to be retained. Especially because it was such a trivial deletion, it shouldnât override the edit, but even if itâs not a trivial thing that is deleted, the stuff created on the other computer should not be deleted by a delete taking place elsewhere. They donât know what all was deleted.
If both nodes are edited, the sync process should know both nodes are edited, and create an extra conflict node so we can see both versions. A tag gets attached to each version saying we have a sync issue, and the users can review both and integrate. (Searching for #syncissue could be very helpful for a user trying to resolve the confusion.)
If one node is deleted and the other edited, the edited one should remain, and (optional) mark as a #syncissue.
Environment
Tested with Windows, Chrome, and iOS app as my two devices. I had wifi not connected for the computer. (was at Starbucks, connection not opened yet).
Additional information
No, the item that got deleted never made it into the History.
Additional comments
A very important point here: I might not know the other computer didnât sync yet. From the current screen it says synced, but if they other was turned off, then I turn it on and it syncs, accidental deletion may occur.
Points 3 and 4 above can (probably) happen in reverse. That is, everything is synced and I delete a node. Later I go to a computer which I thought was synced, do a whole bunch of work, and then SURPRISE it all gets erased.
Implementing is a bit tricky of course. In detail, what you should have is timestamping or version stamping of nodes. When syncing a change, you need to detect not the just exact same node, but any children of that node in the case of deletion.
I am all but certain this bug has caused me to lose a non-trivial amount of data in the past. Trouble is it can be subtle - something disappears that you arenât looking at now. And afterwards you wonder if you really typed it where you thought you did.