{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/11935","labels_url":"https://api.github.com/repos/owncloud/core/issues/11935/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/11935/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/11935/events","html_url":"https://github.com/owncloud/core/issues/11935","id":47703704,"number":11935,"title":"Cache inconsistency with FS when deleting/restoring versions","user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/sev4-low","name":"sev4-low","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/technical%20debt","name":"technical debt","color":"FFFF00"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-11-04T11:35:54Z","updated_at":"2015-08-21T16:32:36Z","closed_at":"2015-08-21T16:32:36Z","body":"### Steps to reproduce\r\n1. Create a file \"test.txt\"\r\n2. Edit then save the file multiple times to create versions\r\n3. Check versions in the versions dropdown\r\n4. Check database: `select * from oc_filecache where path like '%/test.txt%';`\r\n5. Delete file \"test.txt\"\r\n6. Check database again\r\n7. Restore file \"test.txt\"\r\n8. Check database again\r\n\r\n### Expected result\r\nAt step 4 the versions are listed under \"files_versions\" in the database.\r\nAt step 6 the versions are listed under \"files_trashbin/versions\".\r\nAt step 8 the versions are back under \"files_versions\".\r\n\r\n### Actual result\r\nAt step 6 the versions are STILL under \"files_versions\" even though in the filesystem they are under \"files_trashbin/versions\".\r\nAt step 8 the versions are now under \"files_trashbin/versions\" even though in the filesystem they are back under \"files_versions\".\r\n\r\n### Versions\r\nownCloud 7 stable7 (f718e88aa11409104c1434255ea7c947be4b2308) and also on master (6f0c8141642bf3d2a1ca4f038ff5f97359b0ab15)\r\n\r\nThis issue doesn't seem to break functionality, but who knows what side effects it could cause.\r\n\r\nI remember that @icewind1991 added a change that made the scanner also work for files_versions and files_trashbin. I'd expect that if the trashbin uses `$view` operations the cache would update automatically. @schiesbn any idea ?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/133483588","html_url":"https://github.com/owncloud/core/issues/11935#issuecomment-133483588","issue_url":"https://api.github.com/repos/owncloud/core/issues/11935","id":133483588,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T16:32:36Z","updated_at":"2015-08-21T16:32:36Z","body":"I think this has been fixed in OC 8.\r\n\r\nAlso in OC 8.1 the trashbin expiration happens in a background job, and the scanning has been optimized."}}