Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless sync with "Delete local data and re-download from sync target" #9023

Closed
ParanoidShiba opened this issue Oct 6, 2023 · 8 comments
Closed
Labels
bug It's a bug

Comments

@ParanoidShiba
Copy link

Environment

Joplin version: 2.12.8 (prod, win32)
Platform: Windows
OS specifics: Windows 11
Syncing with Joplin Cloud

Steps to reproduce

  1. Start Joplin Desktop.
  2. Disable note history.
  3. Synchronize.
  4. Use Victor plugin to delete all files. This succeeds as expected with "All items have been deleted".
  5. JoplinCloud still has 40MB, so per instructions in Victor readme, do Tools -> Options -> Synchronisation -> Delete local data and re-download from sync target.
  6. Endless sync. Waited overnight, about 12 hours. Joplin won't let me cancel, either. Just keeps going.
  7. Forced sync stop by rebooting Windows, started from 1. with same results.

Describe what you expected to happen

  1. For sync to complete.
  2. If the sync is corrupted, for Victor to delete all resources.
  3. If Victor fails, to allow a fresh restart.

Logfile

Victor seems to succeed

victor

Cannot cancel.

cancelling

Looks like something is wrong with number of items.

syncstatus

During endless sync, went through lots of fetched items:

2023-10-06 16:08:57: Synchronizer: "Sync: fetchingTotal: Fetching delta items from sync target"
2023-10-06 16:08:57: Synchronizer: "Sync: fetchingProcessed: Processing fetched item"
2023-10-06 16:08:57: Synchronizer: "Sync: fetchingProcessed: Processing fetched item"
2023-10-06 16:08:57: Synchronizer: "Sync: fetchingProcessed: Processing fetched item"

And went into loop:

2023-10-06 17:34:54: RevisionService: "maintenance: Starting..."
2023-10-06 17:34:54: RevisionService: "maintenance: Service is enabled"
2023-10-06 17:34:54: RevisionService: "collectRevisions: Created revisions for 0 notes"
2023-10-06 17:34:54: RevisionService: "maintenance: Done in 107ms"
2023-10-06 17:44:54: RevisionService: "maintenance: Starting..."
2023-10-06 17:44:54: RevisionService: "maintenance: Service is enabled"
2023-10-06 17:44:54: RevisionService: "collectRevisions: Created revisions for 0 notes"
@ParanoidShiba ParanoidShiba added the bug It's a bug label Oct 6, 2023
@laurent22
Copy link
Owner

could you post the full log?

@ParanoidShiba
Copy link
Author

ParanoidShiba commented Oct 6, 2023

Thanks for checking laurent22, uploading whole log.

[log.txt]
(removed link)

@laurent22
Copy link
Owner

Thanks for the log. I don't see anything obviously wrong in there, it just looks like there's a lot to sync so you might just want to let it run overnight for example so that it completes a full sync once. Once that's done, sync operations should be fast again

@ParanoidShiba
Copy link
Author

ParanoidShiba commented Oct 8, 2023

Thanks for tackling the log!
I tried re-installing Joplin and let it do the full sync. So now with only the default "Welcome!" notebook with five notes.
However, after the sync, I have 10,707 NoteTags and 2,459 Revisions (attached). No other notes. Is this expected?
2023-10-08-0943_aftersync

I then proceeded to install Victor. I recall using v1.0.0, but now is v1.0.1.
Running Victor does not change the above numbers. I assume this is the reason I continue to have 40MB on Joplin Cloud. Will Victor not delete the NoteTags?

Adding my log for reference.
log-2023-10-08.txt
(edited the log to remove my email addresses)

@ParanoidShiba
Copy link
Author

I checked my local database.sqlite, which is 27MB, and it does have 10,707 note_tags and 2,464 revisions.
It seems that my original "Delete local data and re-download from sync target" is working, and it is Victor that is not deleting all my resources that I would expect. Could Victor clear the note_tags and revisions tables, too?
Maybe I should close this thread and ask for an update of Victor.

@ParanoidShiba
Copy link
Author

Thank you laurent22, I'll close this issue as it is not really a Joplin bug, but more of a function request for the Victor plugin.

@laurent22
Copy link
Owner

The latest version of Victor also deletes the revisions which should solve some of these issues

@ParanoidShiba
Copy link
Author

Yes, thank you so much for that update! Much appreciated. I should have mentioned that Victor v1.0.1 deletes revisions.
For me, it looked like note_tags take up a majority of the size, so not a big difference.
Hopefully it will reduce the sync time for other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

2 participants