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

Dont update the cache when working with part files #13836

Merged
merged 2 commits into from
Feb 18, 2015

Conversation

icewind1991
Copy link
Contributor

The actually write to the cache is already not done for the part files but atm it still trigers things like the change propagator.

Also includes a fix to not update the cache after an fopen (since the file isn't changed until the handle is actually used)

Combined it saves 14 queries when doing a WebDAV PUT in my instance (comparison)

cc @DeepDiver1975 @PVince81

@icewind1991 icewind1991 added this to the 8.1-next milestone Feb 2, 2015
@PVince81
Copy link
Contributor

PVince81 commented Feb 2, 2015

Nice. How about the other cache operations like delete ? (which might happen when renaming a part file to final file)

@scrutinizer-notifier
Copy link

The inspection completed: 3 new issues, 1 updated code elements

@ghost
Copy link

ghost commented Feb 5, 2015

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/8783/
Test PASSed.

@@ -811,7 +811,7 @@ private function basicOperation($operation, $path, $hooks = array(), $extraParam
if (in_array('delete', $hooks) and $result) {
$this->updater->remove($path);
}
if (in_array('write', $hooks)) {
if (in_array('write', $hooks) and $operation !== 'fopen') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have more consequences, but possibly positive.
I remember seeing it update the file cache with size 0 whenever a file was getting opened. Didn't make much sense, so this change might help. I hope it won't break other things though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: this was in the cross-storage rename case where files were copied to the target storage. Since they used fopen() it would create an empty file first in the cache.

@PVince81
Copy link
Contributor

PVince81 commented Feb 9, 2015

👍 works

Moving files cross storage also still works as before. (it causes a redownload, but that is another issue that exists on master: #13310)

@PVince81
Copy link
Contributor

Needs a second reviewer @DeepDiver1975 @nickvergessen @MorrisJobke @schiesbn

@DeepDiver1975
Copy link
Member

👍

DeepDiver1975 added a commit that referenced this pull request Feb 18, 2015
Dont update the cache when working with part files
@DeepDiver1975 DeepDiver1975 merged commit b32d31a into master Feb 18, 2015
@DeepDiver1975 DeepDiver1975 deleted the part-no-cache-update branch February 18, 2015 23:08
@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants