Description
See original issue here: owncloud/client#2378 (comment)
Currently (in OC 7.0.3 RC1) whenever a part file gets renamed to the final file, the file cache is updated.
If the cache update fails (due to "database is locked" or other issues), the file is still renamed to the target file.
A subsequent scan will find the mtime/size difference and think the file changed (since the change wasn't in the cache) and it will update the cached metadata, including etag. This will cause the client to redownload the file.
One possible solution for this would be to update the cache BEFORE renaming the part file to the final file. Only if the cache update worked, rename the part file.
The worst that happens in such cases is that the file is redownloaded and causes additional traffic (no data corruption), then the sync client finds that the downloaded file matches the local file and discards it.
@icewind1991 what do you think ?
Activity
MorrisJobke commentedon Aug 3, 2015
@PVince81 Isn't this fixed with high level file locking? :)
PVince81 commentedon Aug 3, 2015
Yes
MorrisJobke commentedon Aug 3, 2015
Info: This was fixed in 8.1.0
PVince81 commentedon Aug 3, 2015
with transactional file locking enabled: https://doc.owncloud.org/server/8.1/admin_manual/configuration_files/files_locking_experimental.html