Sync deletes stuff

The prerequisite to getting stuff to disappear is probably inconstant internet connection. If you make an edit in two devices and then sync, that’s when it can go wrong. And specifically if the operation in one of these places is to delete something.

The reason this comes up is probably because there isn’t necessarily a constant relation between the content of a node and the node itself. You can press enter to split a node or create a blank node, you can cut / paste stuff, and on another device that wasn’t synced, you might delete what looks like an irrelevant line, but on the other end it had become relevant content. But at sync that relevant content is deleted.

I think the ideal solution would be a recycle bin document where anything that gets deleted gets sent to that bin where you could visit and Move back in. This must include content that gets sent to the server after the content’s node is deleted. Currently Dynalist discards such because there’s nowhere to put it.

By the way, even though I’m a die-hard DynaLister, this issue is why I do not and have not recommended everybody at my work team get the tool to share notes. It’s just too dangerous. As a solo worker I can avoid these bugs. If this were resolved I’d change my tune.

Just curious, have you checked the Version History option in Dynalist?
Most likely all the changes and the deleted stuff are somehow still registered in there, as red and green.

It’s just a matter of reviewing this piece of feature from time to time, whenever we “feel” the normal sync was not that reliable.

Yes, on occasion. In fact, Version History has most changes, but sometimes if sync doesn’t do it’s thing somethings are lost. It hasn’t been an issue for a while since I’ve learned to avoid the bug.

I’ve got the nub of the issue. I’m sure the Devs can confirm this if they try: if two devices change each a node and then sync, do both edits go to the server?

The answer ought to be yes but is actually no, at least for certain kinds of changes The later edit ought to become the current text, and the earlier edit is in the history.

I think in the case of simple text changes this may work right, but i’m not certain. In the case where the first to sync deletes a line, the second to sync gets its change rejected because the node is no longer in the document. It would be better to restore the node so the edits can be put into the server. Then we could use History to reconcile the issue because all changes are on the server.

A bad behavior would be if sync first retrieves edits from the server, and local edits get clobbered never having been put into the database.

Two changes does both get to the server, but indeed if one session deleted an item, then the second one will not make it. I will think more about it and see if there’s some way to restore it.

2 Likes

It’s bit me again. I had been pretty good at avoiding this bug but this past week I’d been pushing DynaList to the max and boom: a whole lot of stuff vanished. Specifically, I’ve been restructuring my knowledge base, and getting into a workflow like Obsidian enables: side by side document panes. DynaList can do this with the web version (and the other side may be the app version, or another browser window). So somewhere in the midst of cleaning up things, I deleted stuff in one window, and in the other window same document I was writing different things. And that got deleted. Not a big deal, because I know what I wrote and could write it again.

But this is the one issue that prevents me from telling everybody to get DynaList. Although if most people only use one window one device it would never come up. But for me, the multiple device thing is absolutely the first reason I use DynaList. Who else has quality Windows, iOS, and Web experience and syncing?

[ And also fast outlines, and quick keyboard manipulations, and bountiful styling, and … ]

But all that is moot if your data gets lost.

In light of this, and in light of all the requests for finding lost data caused by other accidental deletions, can you PLEASE add a magic file that holds all the things you delete (or additions/edits that the server fails to accept because the target node is gone). It acts as a trash bin / recycle bin. (OneNote has this as a Deleted Notes section; it also generates conflict pages if sync isn’t smooth.)

1 Like

I have also encountered this deletion effect when syncing.

For myself, I found the main reason that if I created an empty string, then when writing something else to this empty string on different devices and problems with synchronization, the latter will win.

I solved this problem for myself by not creating an empty line in advance, but only directly while writing a note.

For Dynalist developers, I would like to recommend not creating an ID for an empty string.

Deleting an empty string does not look destructive, although something was written to the string with this ID on another device.

You need to create an ID only when it becomes not empty and visually different.

Every time a user starts writing to a new empty line, a NEW line with a NEW ID should be created.

Turned on my phone today. No internet signal. Entered a new note. Five minutes later the note was gone.

I think there’s an issue that my new note must have shared an id with a note created on another device. That shouldn’t be.

Aren’t the unique identifiers pseudorandom functions of the unix millisecond timestamp + your device unique ID + blahblahblah so you get 48lbFoF0qJny5L_2NY6zdQ_6 or loESK9OzDP-UIDSeFjto6s7X or gFBwt9xrirqp-XLZi_UUpg7R which probably are just the right length where the statistical likelihood of generating the same string twice is like 1 in 10 gabazillion x the age of the universe?

Maybe your internetless phone killed the app process before caching the data? Maybe the note just shuffled below other stuff and you overlooked it?

I dunno. Very mysterious. Very odd.

“Killed the app process”? No process was killed. The data was “saved”, it said so. Then sync happened (after phone discovered a signal and connected). And that sync destroyed the note, which note was at the bottom of the document, at the top level. Other changes appeared elsewhere.

Very very strange.

I doubt the unique identifier string is to blame though, I don’t see how it would ever generate the same one twice.

Maybe you could reproduce the bug again by turning off wifi and following the same exact procedure? Or it’s just too rare to reproduce? Is it always a note at level 1 of a document?

Ran into a situation yesterday where my phone’s internet connection was broke. Phone claimed to be connected but nothing could be retrieved by any app. Had to reset.

What concerns me is how Dynalist behaves in this situation. It claimed Synced. But it clearly wasn’t as everything I had changed on another devise hadn’t come in.

Since I know concurrent edits are dangerous, I try to ensure data is synced before editing. So what am I to do if it lies to me?
(PS Refresh command may be part of the scenario)

Could you clarify that story? It sounds like logical computer science.

“Synced” can only ever mean “my data matched the server on the last communication” and can never mean “the infinite possible clients are all in sync at this instant” by the laws of physics

Client A makes change, displays “Sync now” link
Client B makes change, displays “Sync now” link
Client A syncs change to Server, displays “Synced”
Client B syncs change to Server, server detects a conflict and runs merge algorithm, displays “Synced”
Client A checks periodically with Server, sees a serverside change eventually, downloads the merged server version, displays “Synced” again

Isn’t that the ideal and optimal information theory scenario?

I probably misunderstood since I’m sure you know it’s not lying to you, but rather the server has no possible way of knowing about an offline clients edits

I didn’t state it clearly. It is the Phone that said Synced, even though the phone was in fact offline. (I didn’t know it was offline because the data signals said it was good, but in fact the communications weren’t working.)

So if you make a change, wait for Syncing to say Synced, shut off the phone, then load dynalist on another device, you’ll never see the change? I thought it only says Synced if the server acknowledges it matches up…

Do you have any hunches of what could be happening?

Not solutions, but some things that come to mind are:

  • Turn on Advanced WiFi settings > Avoid Poor Connections
  • Test if that phone shows red “offline” when you keep this page open then lose signal, or manually turn data off https://jsfiddle.net/0GiS0/M6Xdm/

Has this bug only occured on that particular phone this whole time? Is it always the electron app or also the browser? It seems like you’re the only person suffering from it over the last year, I haven’t seen other posts like it.

Once the phone gains internet, it still doesn’t sync the change? Is the change a new item or a change to an item, maybe it lost the merge/conflict resolution battle because it was older?

Maybe it’s because my phone is getting older, but the situation was a few times I needed to reboot to get internet working again. I think the main scenario that concerns me is like this: I make a change elsewhere, go to my phone, wait for changes to sync, then start working. BUT: the phone not being connected cannot sync, and DynaList does not report the lack of incoming data. It only ever notes a failure to send data.

I assume most people don’t run into this because they are generally on reliable internet connections, or they don’t frequently switch between devices with DynaList, whereas I frequently use 4 different devices.
(actually it’s worse than that; because of feature-non parity, i use both app and browser on all of these, so it’s more like 8 DynaLists.)