Skip to content

cache updater updates etag too often #10078

Closed

Description

@butonic

As admin create a folder hierarchy like: /f1/f2/f3/f4/f5 and share f3 to test.As test create a folder hierarchy /f10/f11 and move tha shared f3 to f11. Then watch the query log when moving f3 to / by DnD it to the home icon in the web ui. This is the result greped for the updates (fileids: 29 => f3, 32 => , 33 => files, 55 => f10, 56 => f11 ):

{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406792750,   1 => '53d9f42e42479',   2 => '56', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406792750,   1 => '53d9f42e428bf',   2 => '55', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406792750,   1 => '53d9f42e42d3c',   2 => '33', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406792750,   1 => '53d9f42e43128',   2 => '32', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"storage_mtime\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406791897,   1 => 1406791897,   2 => '56', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"size\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 0,   1 => '29', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406736961,   1 => '53d9f42e67c49',   2 => '33', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"mtime\" = ?, \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => 1406736961,   1 => '53d9f42e680b0',   2 => '32', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
--
{"reqId":"53d9f42de8fcd","app":"core","message":"DB prepare : UPDATE \"oc_filecache\" SET \"etag\"=? WHERE \"fileid\" = ?","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}
{"reqId":"53d9f42de8fcd","app":"core","message":"DB execute with arguments : array (   0 => '53d9f42e79169',   1 => '33', )","level":0,"time":"2014-07-31T07:45:50+00:00","method":"POST","url":"\/core\/index.php\/apps\/files\/ajax\/move.php"}

let me minify that and have a look at only the etag updates

-- removing from source
-- test/files/f10/f11
UPDATE `oc_filecache` SET `mtime` = 1406792750, `etag`='53d9f42e42479' WHERE `fileid` = '56'
-- test/files/f10     
UPDATE `oc_filecache` SET `mtime` = 1406792750, `etag`='53d9f42e428bf' WHERE `fileid` = '55'
-- test/files         
UPDATE `oc_filecache` SET `mtime` = 1406792750, `etag`='53d9f42e42d3c' WHERE `fileid` = '33'
-- test/              
UPDATE `oc_filecache` SET `mtime` = 1406792750, `etag`='53d9f42e43128' WHERE `fileid` = '32'
-- adding to target
-- test/files         
UPDATE `oc_filecache` SET `mtime` = 1406736961, `etag`='53d9f42e67c49' WHERE `fileid` = '33'
-- test/              
UPDATE `oc_filecache` SET `mtime` = 1406736961, `etag`='53d9f42e680b0' WHERE `fileid` = '32'
-- ?
-- test/files         
UPDATE `oc_filecache` SET `etag`='53d9f42e79169' WHERE `fileid` = '33'

hmmm, now that I look at it I understand how target and source need to be updated ... nevertheless, there should be something we can do here. In all this I left out dozens of SELECTS that we should be able to cache.

@icewind1991 @schiesbn @DeepDiver1975 some food for thought

Activity

  1. modified the milestone: backlog on Mar 21, 2015
  2. MorrisJobke commented on Oct 12, 2015

    @MorrisJobke
    Contributor

    Isn't this mostly fixed by #15549?

    Or do we still look for the actual cause? cc @icewind1991

  3. icewind1991 commented on Oct 12, 2015

    @icewind1991
    Contributor

    This seems like #18359

  4. removed this from the backlog milestone on Mar 2, 2016
  5. lock commented on Aug 5, 2019

    @lock

    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.

  6. locked as resolved and limited conversation to collaborators on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions