-
Notifications
You must be signed in to change notification settings - Fork 668
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
[Enhancement] Check file hash before starting network transfer #6153
Comments
This is a new feature in 2.4, see #5838. If the size, mtime and content hash match, no data will be downloaded. We would be happy if it would see additional tests (like with the 2.4 alpha). |
I'm re-opening this. When having a good checksum (md5 or sha1) then there is no need for mtime check. The tuple (size,checksum/hash) is good enough. Please remove this mtime check if possible :-) @ckamm Not sure if this is too late for 2.4.0. Maybe move to 2.4.1 or 2.5.0 |
If we don't discover significant issues during review I think this PR will be fine for 2.4 |
I agree with guruz, the mtime check might be the reason why it didn't work for me during the first sync (a big folder was unnecessarily downloaded), maybe while moving files across different OS (Win, Linux, OSx) mtime can be touched somewhere... |
Previously we required matching mtimes but that's actually unnecessary when the question is about whether to skip the download. We will still update the file's metadata. Also, adjust behavior when the checksum is weak (Adler32): in these cases we still depend on equal mtimes.
Previously we required matching mtimes but that's actually unnecessary when the question is about whether to skip the download. We will still update the file's metadata. Also, adjust behavior when the checksum is weak (Adler32): in these cases we still depend on equal mtimes.
Finally got to check this. It's actually quite dope. Might also partially fix #5388 Closing! |
Following this discussion with @dragotin, it would be very useful to implement file hash check in the client, in order to avoid unnecessary data transfer, saving time and bandwitdh when syncing big folder with most of the files #equal.
Expected behaviour
Actual behaviour
Equal files are unnecessarly downloaded, wasting a lot of time and bandwidth.
Steps to reproduce
Server configuration
Operating system: CentOS 7.2
Web server: Apache 2.4.6
Database: MariaDB 5.5.56
PHP version: 7.1
ownCloud version: 10.0.3
Client configuration
Client version: 2.3.3 (build 8250)
Operating system: Windows 7
OS language: Italian
Logs
no error log
The text was updated successfully, but these errors were encountered: