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

Hasher: trust cached sum #7818

Open
giovi2 opened this issue May 1, 2024 · 0 comments
Open

Hasher: trust cached sum #7818

giovi2 opened this issue May 1, 2024 · 0 comments

Comments

@giovi2
Copy link

giovi2 commented May 1, 2024

Hello,
I'm opening this feature request issue following @nielash suggestion under my post in the forum.

I would like to ask for a new flag for the hasher backend that will make the database read-only when downloading a file from the remote.
This might be useful to keep track of data corruption while working with backends that don't support checksums.

To further explain my point,
as it is now, while uploading a file to a remote, the hasher will hash on the fly and store it in the database.
If the hash of the file changes afterwards (be it for network issues after the sum or anything else linked to the remote) and you download it again, the hasher will check it against the one in the database and update the entry with the new hash, no retries are made (-vv shows as such).

So my idea was: instead of simply update the entry, rclone would retry to download the file until the given number of --retries (since the issue might still be during the downloading process and the file might be actually fine on the remote) and eventually fail the transfer with the error "hashes differ."

This way the entry in the database won't be updated and you can read from logs that file changed from the one you had at the beginning.

In addition to this, @nielash suggested the addition of another interesting flag such as a fully-read-only mode of the database working exclusively with manually imported hashes.

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

No branches or pull requests

2 participants