{"action":"closed","number":31958,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/31958","id":198486120,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDg2MTIw","html_url":"https://github.com/owncloud/core/pull/31958","diff_url":"https://github.com/owncloud/core/pull/31958.diff","patch_url":"https://github.com/owncloud/core/pull/31958.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/31958","number":31958,"state":"closed","locked":false,"title":"[objectstorage] Cache stat while fetching objectstore object metadata","user":{"login":"mrow4a","id":13368647,"node_id":"MDQ6VXNlcjEzMzY4NjQ3","avatar_url":"https://avatars2.githubusercontent.com/u/13368647?v=4","gravatar_id":"","url":"https://api.github.com/users/mrow4a","html_url":"https://github.com/mrow4a","followers_url":"https://api.github.com/users/mrow4a/followers","following_url":"https://api.github.com/users/mrow4a/following{/other_user}","gists_url":"https://api.github.com/users/mrow4a/gists{/gist_id}","starred_url":"https://api.github.com/users/mrow4a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrow4a/subscriptions","organizations_url":"https://api.github.com/users/mrow4a/orgs","repos_url":"https://api.github.com/users/mrow4a/repos","events_url":"https://api.github.com/users/mrow4a/events{/privacy}","received_events_url":"https://api.github.com/users/mrow4a/received_events","type":"User","site_admin":false},"body":"### Problem Description\r\n\r\nThe same logic for calling stat in objectstore compared to filesystem implementation is inefficient.\r\n\r\nThis is due to the fact that objectstore does not implement any filesystem functionality which stores information about file, and thus needs to resort to using filecache. \r\n\r\n### Solution\r\n\r\n<img width=\"722\" alt=\"statcache\" src=\"https://user-images.githubusercontent.com/13368647/44001485-8873a4ee-9e33-11e8-99f1-cded2924d594.png\">\r\n\r\nThis PR implements stat cache similar to filesystem to temporarly cache results between calls to filesystem. Each request to modify filesystem clears the stat cache. Additionaly, we store only cache for objects, not for file tree (directories).\r\n\r\n### How did I test\r\n\r\nI did:\r\n- upload new file\r\n- overwrite new file\r\n- again overwrite (generate next version)\r\n\r\nMaster:\r\n<img width=\"915\" alt=\"diagnostic-master\" src=\"https://user-images.githubusercontent.com/13368647/44001482-72ed3aae-9e33-11e8-8ab2-2803374fb0d7.png\">\r\n\r\nObj Stat:\r\n<img width=\"918\" alt=\"diagnostic-obj\" src=\"https://user-images.githubusercontent.com/13368647/44001484-79f1ab50-9e33-11e8-82f3-7977bfac8673.png\">\r\n\r\nThis PR thus cuts 20% of read queries required for objectstore.\r\n\r\n### Related PRs\r\n\r\nDue to the fact there is no decision on introducing \"cache of filecache\", this PR is just fixing the code logic. \r\n\r\n- Cache in filecache (https://github.com/owncloud/core/pull/28166)\r\n- Cache of objectstore metadata (https://github.com/owncloud/core/pull/31486)\r\n\r\n@PVince81 @DeepDiver1975 @butonic ","created_at":"2018-06-30T17:22:19Z","updated_at":"2018-11-07T23:05:45Z","closed_at":"2018-11-07T23:05:45Z","merged_at":"2018-11-07T23:05:45Z","merge_commit_sha":"5fbc0cb15fb906552dfbf2d382b7e345a0db4f11","assignee":{"login":"DeepDiver1975","id":1005065,"node_id":"MDQ6VXNlcjEwMDUwNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1005065?v=4","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false},"assignees":[{"login":"DeepDiver1975","id":1005065,"node_id":"MDQ6VXNlcjEwMDUwNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1005065?v=4","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/owncloud/core/pulls/31958/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/31958/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/31958/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/e436abb04f1e6c77f472ad70f306ffee61fa1133","head":{"label":"owncloud:obj_meta","ref":"obj_meta","sha":"e436abb04f1e6c77f472ad70f306ffee61fa1133","user":{"login":"owncloud","id":1645051,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDUwNTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"node_id":"MDEwOlJlcG9zaXRvcnk1NTUwNTUy","name":"core","full_name":"owncloud/core","private":false,"owner":{"login":"owncloud","id":1645051,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDUwNTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2018-11-07T21:56:05Z","pushed_at":"2018-11-07T23:05:45Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":245074,"stargazers_count":6349,"watchers_count":6349,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1876,"mirror_url":null,"archived":false,"open_issues_count":1401,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1876,"open_issues":1401,"watchers":6349,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"a3bd9316e5838786e455811e4388a4910225ff27","user":{"login":"owncloud","id":1645051,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDUwNTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"node_id":"MDEwOlJlcG9zaXRvcnk1NTUwNTUy","name":"core","full_name":"owncloud/core","private":false,"owner":{"login":"owncloud","id":1645051,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDUwNTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/owncloud/core","description":":cloud: ownCloud web server core (Files, DAV, etc.)","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/core/deployments","created_at":"2012-08-25T10:32:48Z","updated_at":"2018-11-07T21:56:05Z","pushed_at":"2018-11-07T23:05:45Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":245074,"stargazers_count":6349,"watchers_count":6349,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1876,"mirror_url":null,"archived":false,"open_issues_count":1401,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1876,"open_issues":1401,"watchers":6349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/31958"},"html":{"href":"https://github.com/owncloud/core/pull/31958"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/31958"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/31958/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/31958/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/31958/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/e436abb04f1e6c77f472ad70f306ffee61fa1133"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"DeepDiver1975","id":1005065,"node_id":"MDQ6VXNlcjEwMDUwNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/1005065?v=4","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false},"comments":14,"review_comments":7,"maintainer_can_modify":false,"commits":3,"additions":199,"deletions":90,"changed_files":2}}
{"actor":{"display_login":"DeepDiver1975"}}