Clear (invalid) checksum when upgrading from OC
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
When upgrading from OC 10.5.0 to NC 21.0.0beta2 we should clear the checksums in the database.
As far as I saw any upload from the NC desktop client would also clear the checksum, so we should do it right away or have an occ command to do so.
Why ? Because if there are broken checksums the desktop client will not sync the files.
In my own setup I had some broken checksums on OC before doing the upgrade. How I managed to have broken checksums, not sure... I interrupted a request that was restoring files from trashbin.
Steps (guessed from my setup)
- Setup OC 10.5.0
- Upload a bunch of TXT files using the NC desktop client (which means you'll still have a local copy)
- Edit oc_filecache and manually corrupt the checksum of a file "test-corrupt.txt"
- Upgrade to NC 21.0.0beta2
- Run the NC desktop client
- Edit "test-corrupt.txt" locally
- Check the server version in the web UI
Expected result
"test-corrupt.txt" can be uploaded, the file is changed on server.
Actual result
"test-corrupt.txt" is not uploaded, the NC desktop client says there's a checksum mismatch.
Versions
OC 10.0.5 -> NC 20.0.0beta2
NC desktop client 3.1.0 (openSUSE package)
Notes
Best solution so far is to manually delete those broken checksums to resume syncing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the oc_filecache table and an upgrade from OC 10.5.0 to NC 21.0.0beta2; start by tracing where checksum values are migrated or validated during upgrade. Compare the proposed database cleanup with an occ command, then verify that a previously corrupted test-corrupt.txt can be edited and uploaded without a checksum mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100