Skip to content

Dont update the cache when working with part files - #13836

Merged
DeepDiver1975 merged 2 commits into
masterfrom
part-no-cache-update
Feb 18, 2015
Merged

DeepDiver1975 merged 2 commits into
masterfrom
part-no-cache-update

Conversation

@icewind1991

Copy link
Copy Markdown
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

PVince81 commented Feb 2, 2015

Copy link
Copy Markdown
Contributor

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

@scrutinizer-notifier

Copy link
Copy Markdown

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

@ghost

ghost commented Feb 5, 2015

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
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
Copy Markdown
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

PVince81 commented Feb 9, 2015

Copy link
Copy Markdown
Contributor

👍 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
Copy Markdown
Contributor

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

@DeepDiver1975

Copy link
Copy Markdown
Contributor

👍

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