Temporarily cache objectstore stat metadata for duration of storage->getMetadata #31482
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