[Beta Test] Joplin Server / Cloud - Syncing of "Ghost" Items After Server Cleared

Used Joplin Cloud for a while. Decided to clear down the client and the server and start again.

Joplin Desktop 2.1.7 was reverted to "unused" by way of a VM snapshot, so there was no residual data. Before syncing the client form the first time, the default notes were deleted from the client and a set of 24 test notes imported. Joplin was connected to the server and synced.

The test notes and resources were uploaded but Joplin then fetched 2569 items from a server that should have been empty apart from the notes, resources, tags , metadata etc. that had just been uploaded. 2569 is probably the number of items that were stored on the server before the data was deleted.

Fetching_what

Nothing extra appeared in Joplin.

Compared to how long it took to sync the few new notes this "ghost" sync took a notable amount of time.

It would seem that despite all items being deleted on the server there is still data remaining that the server will "sync" with any new client. I suppose that this could be as a result of how the sync works rather than any bug. However if the server had previously been heavily used this could take quite a while as thousands of "non-items" are apparently fetched.

The mentioned items are actually delta entries, one for each object that was deleted, so the way I see it's normal. I think it's because you've also manually deleted everything that it seems weird to get 2569 items and nothing happens, but if you still had notes, it would delete them.

Maybe the term "Fetched items" is a bit confusing since it includes both items that will need to be created or updated, and those that will be deleted. Maybe there's a better term but not sure what.

I admit it is quite a bit of an edge case.

I was just thinking of where a Joplin Cloud user has note history set to max and starts to exceed any data caps. A quick way to redress this could be to create a JEX of all current content. Then delete all data on the server. Then import and resync. This wipes note history and any resources that are not actually in current use.

However the user would have to wait for all their data to sync and then wait again whilst the deltas for every old item were fetched and ignored.

It would seem that this is something that may be better addressed if it ever causes a problem!!!