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

setSelectiveSyncList is not transactional: selective sync entries lost in sqlite.db #6431

Closed
moscicki opened this issue Apr 6, 2018 · 8 comments
Assignees
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Milestone

Comments

@moscicki
Copy link
Contributor

moscicki commented Apr 6, 2018

MacOSX, client 2.3.3 (and versions before)

This happens quite often when I have a disk full or on system shutdown.

Selective sync information is lost. It looks like this is not committed as a proper transaction. When this happens sync client complains about big folders and asks for action.

As a result I have to redefine and exclude from sync big folders manually every time (in the selective sync tree). This is very annoying and error prone.

Normally it looks like this:

sqlite3 ._sync_98ffb08a1b2e.db
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> select * from selectivesync;
Desktop/|2
Desktop/XYZ/|1
...

When the problem occurs it looks like this:

sqlite> select * from selectivesync;
Desktop/|1
...

@SamuAlfageme : you have seen this problem live at last workshop ;-)

@moscicki
Copy link
Contributor Author

moscicki commented Apr 6, 2018

BTW: I won't be able to follow up on this for several days.

@ogoffart ogoffart self-assigned this Apr 6, 2018
@ogoffart
Copy link
Contributor

ogoffart commented Apr 6, 2018

Right, SyncJournalDb::setSelectiveSyncList should be made more transactional.

@ogoffart ogoffart added this to the 2.5.0 milestone Apr 6, 2018
@guruz guruz added type:bug and removed Enhancement labels Apr 6, 2018
@guruz guruz changed the title selective sync entries lost in sqlite.db setSelectiveSyncList is not transactional: selective sync entries lost in sqlite.db Apr 6, 2018
@guruz
Copy link
Contributor

guruz commented Apr 6, 2018

@ogoffart setDataFingerprint too? Or change it to use INSERT OR REPLACE?

@ogoffart
Copy link
Contributor

ogoffart commented Apr 9, 2018

@guruz setDataFingerprint is already in a transaction because it is called from the sync engine in which everything is in a transaction.

@moscicki
Copy link
Contributor Author

moscicki commented Oct 9, 2018

Question: can the loss of selective sync information also happen due to client shutdown while auto-update? We have such cases reported.

@ogoffart
Copy link
Contributor

ogoffart commented Oct 9, 2018

Not that i am aware of.

@ogoffart
Copy link
Contributor

ogoffart commented Oct 9, 2018

But the fix above was only done in 2.5.0, so upgrades to 2.4.x may still be affected by the original bug.

@moscicki
Copy link
Contributor Author

moscicki commented Oct 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Projects
None yet
Development

No branches or pull requests

5 participants