Help required: Sync in Joplin

Can someone please help me understand the Sync in Joplin. I mean we don’t have a dedicated database for users in Joplin. All of their data is stored in their accounts like nextcloud, dropbox, etc. And we check all the operations like create, delete, etc. according to their update_time and while syncing we check all the operations with update_time less than the second operation will get executed first.
But what if two operations take place at the same time on two different devices, like updating a note on one device and deleting it on the other device, what operation will get executed first?
And also how are we executing this? I mean from a development and implementation point of view in mobile?
I will be really thankful if someone can help me in this.

what is the sync code saying?
There should be some in code doc, giving information how sync conflicts are solved.

May you find some information in

Thankyou so much Sir, I will look into these issues and PR’s. The code has some comments about how’s it doing that, but I was facing some difficulty in how exactly its working and syncing with other devices. I will look to these issues and code again and will ask you if I still have any doubt.
Thanks for the help.

1 Like

I need help please. I'm in a mess. My desktop told me my nextcloud folder needed more space. So I tried erasing the photos in my notes on my desktop. But it seemed like it wasn't working, as if it were jammed. So I went to nextcloud and erased all the files in the joplin folder. The idea was that the smaller joplin file should fit now. Then when i synced my desktop client it became empty.
So I tried recovering the notes from the trash in nextcloud. That seemed to work, almost all the 800 notes were recovered to the folder. But when I sync my desktop client. I only get 60 files, all in conflict.

I still have all the files on my phone. I tried to back them up somehow but can't find how.
Can someone please guide me?
Thanks

I made a back up that is a Tar archive (application/x-tar) file. But I can't import it. What am I doing wrong?