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

Purge sync errors for removed files #9236

Closed
jnweiger opened this issue Nov 23, 2021 · 8 comments
Closed

Purge sync errors for removed files #9236

jnweiger opened this issue Nov 23, 2021 · 8 comments
Assignees
Milestone

Comments

@jnweiger
Copy link
Contributor

Seen in 2.9.2-rc5 (and probably earlier versions)

After successful syncing, the client shows the blue (i) instead of the green checkmark icon.
The 'Not Synced' tab reports many files that end in '.owncloud' -- They are historic. They existed on the server due to another bug. But have been removed from the server. Client is running without VFS.

The entries still exist in the local database and cannot be removed there:

[testy:~/damkenCloud] $ sqlite3 .sync_aed5c7dcc5be.db
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> select * from metadata where path="Scanner_im_Koffer/Kontakte.txt.owncloud";
349034419178290878|39|Scanner_im_Koffer/Kontakte.txt.owncloud|15097359|0|0|0|1444944788|0|86bed4d84e74ee4c7195aacb4490d587|04883803ocuhsyihz2sp|WDNVR|1|0|b858cb282617fb0956d960215c8e84d1ccf909c6|1
sqlite> delete from metadata where path="Scanner_im_Koffer/Kontakte.txt.owncloud";
Error: unknown function: parent_hash()
sqlite>

Expected behaviour:

  • files that do not exist neither locally nor on the server should never cause an error.
  • it should be possible to manually repair the local database.
  • the blue '(i)' icon should inform the user only about issues, he can fix.
@TheOneRing
Copy link
Member

Have you restarted the client?

@jnweiger
Copy link
Contributor Author

jnweiger commented Dec 2, 2021

Seen after multiple restarts of the client. Also reproduced with client 2.9.2.6188

Seen while the client is stopped.
When the client is running, I get the error message: "Error: database is locked"

@jnweiger
Copy link
Contributor Author

jnweiger commented Dec 2, 2021

Related commit: d43463e

Author: Olivier Goffart <ogoffart@woboq.com>
Date:   Sat Oct 20 13:24:31 2018 +0200

    Database: Add an index on the parent path

    So we can quickly query the items in a parent directory

    This uses a custom slite3 function, which means that when downgrading the client,
    or using another tool to add entries in the database, any insertion in the metadata
    table will produce an error: "unknown function: parent_hash()"
    (This will crash the client 2.5)

@jnweiger
Copy link
Contributor Author

jnweiger commented Dec 2, 2021

Workaround:

  • stop the client
  • sqlite3 .sync_*.db
  • drop index metadata_parent;
  • restart client, ...

Are there any bad sideeffects from manually dropping that index?

@TheOneRing
Copy link
Member

Please don't drop tables, just delete the db or use a selective query.

The client ignores all .owncloud files, that are not placeholders, however .owncloud on the server are not supposed to be present in your db.

The db is from before 2.8 I assume?

@github-actions
Copy link

github-actions bot commented Jan 2, 2022

This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 2, 2022
@github-actions
Copy link

github-actions bot commented Jan 9, 2022

The issue was marked as stale for 7 days and closed automatically.

@github-actions github-actions bot closed this as completed Jan 9, 2022
@TheOneRing TheOneRing removed the Stale label Jan 10, 2022
@TheOneRing TheOneRing reopened this Jan 10, 2022
@TheOneRing TheOneRing added this to the 2.11 milestone Jan 10, 2022
@TheOneRing TheOneRing changed the title Client reports many files as 'not synced' that do not exist any more Purge sync errors for removed files Jan 10, 2022
@TheOneRing TheOneRing modified the milestones: 2.11, 2.10.1 Mar 9, 2022
fmoc pushed a commit that referenced this issue Mar 9, 2022
@TheOneRing TheOneRing mentioned this issue Mar 10, 2022
55 tasks
@TheOneRing
Copy link
Member

Steps to reproduce:

  • Install 2.7
  • Add a file called foo.owncloud (an error will be displayed)
  • Install 2.10.0 (foo.owncloud error)
  • remove foo.owncloud (the error will still be displayed)
  • Update to 2.10.1 (foo.owncloud will no longer be displayed as an error)

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

No branches or pull requests

2 participants