Conversation
mrow4a
commented
May 19, 2018
| */ | ||
| public function getMetaData($path) { | ||
| $this->statCache->enable($path); | ||
| $data = parent::getMetaData($path); |
Contributor
Author
There was a problem hiding this comment.
Use stat cache only for the time of getMetaData call
Contributor
Author
There was a problem hiding this comment.
It is used by file_exists, getMimeType, filesize etc read-only functions during getMetaData call
Closed
Codecov Report
@@ Coverage Diff @@
## master #31482 +/- ##
============================================
- Coverage 62.6% 62.6% -0.01%
- Complexity 18271 18281 +10
============================================
Files 1147 1148 +1
Lines 68621 68643 +22
Branches 1234 1234
============================================
+ Hits 42963 42974 +11
- Misses 25297 25308 +11
Partials 361 361
Continue to review full report at Codecov.
|
7 tasks
Contributor
Author
|
Better approach here -> #31486 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In objectstore, each filesystem attribute needed to be retrieved using separate stat -> this implements more "filesystem" like caching of these properties.
Now, within the duration of storage->getMetadata, stat will be kept in cache and thus repetitive calls will hit stat cache instead of filecache.
Related Issue
This PR is much safer way of avoiding filecache hits then cache of filecache globally - #28166.
How Has This Been Tested?
I used diagnostic app
Old implementation - single put - files_primary_s3
{"type":"SUMMARY","reqId":"uSvspzacGpeHBg5MWWB6","time":"2018-05-19T23:22:33+00:00","remoteAddr":"::1","user":"admin","method":"PUT","url":"/octest/remote.php/dav/files/admin/testnew.txt","diagnostics":{"totalSQLQueries":176,"totalSQLDurationmsec":20.77317237854004,"totalSQLParams":405,"totalEvents":16,"totalEventsDurationmsec":61.043500900268555}}
New implementation - single put - files_primary_s3
{"type":"SUMMARY","reqId":"N3I4Dz8W75GB6yScxrCi","time":"2018-05-19T23:23:13+00:00","remoteAddr":"::1","user":"admin","method":"PUT","url":"/octest/remote.php/dav/files/admin/testnew.txt","diagnostics":{"totalSQLQueries":136,"totalSQLDurationmsec":16.56365394592285,"totalSQLParams":318,"totalEvents":16,"totalEventsDurationmsec":45.438289642333984}}
Types of changes
Checklist:
@butonic @DeepDiver1975 @PVince81 @patrickjahns