Skip to content

"hasUpdated" function is not being called from the OC root folder for mounted FSs #5036

Closed

Description

@jvillafanez

Expected behaviour

When you click in the OC root folder (/index.php/apps/files) the hasUpdated function is called for each mounted storage inside the root folder so that we can know that there are changes inside the mounted storage.

Actual behaviour

That function is not being called for the mounted storage (just for local storage) so other mounted storages don't report a change until we enter in them.

Steps to reproduce

  1. Mount an external FS under the OC root. You'll access to the OC root in the url "/index.php/apps/files" and to the external FS in "/index.php/apps/files?dir=//out" (change the directory name if needed)
  2. Add a new file to that external FS outside OC (don't use OC to upload the file)
  3. Go to the OC root dir "/index.php/apps/files"
  4. Check that the mtime of the "out" folder hasn't changed.
  5. Go inside the "out" folder and back and check that the mtime is now the correct one

Server configuration

Web server: apache
Database: sqlite3
PHP version: 5.3.10
ownCloud version: 5.0.11RC2

Client configuration

Browser: chromium and firefox

Activity

  1. DeepDiver1975 commented on Sep 30, 2013

    @DeepDiver1975
    Contributor

    @icewind1991 any idea? Can you please have a look? THX

  2. icewind1991 commented on Sep 30, 2013

    @icewind1991
    Contributor

    This is intended behavior, hasUpdated is only called for a folder if you enter it, this is done for performance reasons, no need to make expensive calls to external file systems if we aren't browsing the filesystem

  3. DeepDiver1975 commented on Sep 30, 2013

    @DeepDiver1975
    Contributor

    Okay - but this will result in not up to date information like mtime

  4. jvillafanez commented on Oct 2, 2013

    @jvillafanez
    MemberAuthor

    I had some issues with the desktop client regarding this, because I think they only check the mtime of the OC root folder to trigger the synchronization. Other clients might present the same issue.

    Using only the desktop client, you can upload a file as described but you'll never get it in the desktop. You'll need to use the web interface and/or other clients.

  5. DeepDiver1975 commented on Oct 16, 2013

    @DeepDiver1975
    Contributor

    this is most probably related to etag propagation - this requires some more testing

  6. karlitschek commented on Nov 13, 2013

    @karlitschek
    Contributor

    @PVince81 What do you think?

  7. karlitschek commented on Nov 25, 2013

    @karlitschek
    Contributor

    @icewind1991 Can you look into this?

  8. karlitschek commented on Nov 29, 2013

    @karlitschek
    Contributor

    @icewind1991 What do you think?

  9. icewind1991 commented on Dec 2, 2013

    @icewind1991
    Contributor

    Calling hasUpdated on every storage in a folder would give a to large performance hit.

    Having a background job call hashUpdated or scan on external storages regulary would be a much better solution.
    Having the mtime in the webui be off for a little while is not a big enough issue to warrant for the performance hit fixing it would give.

  10. DeepDiver1975 commented on Dec 2, 2013

    @DeepDiver1975
    Contributor

    The performance issue are understandable and valid if we talk about real physical external storage (Like amazon etc.) but does this apply to external storages which live in the same network/server?

    On bigger installations even the user's root can already be mounted to e.g. a lokal SWIFT/OpenStack storage.
    In such a setup desktop sync and web ui is expected to work as if it would be local disk space on the server.
    (An yes I know it technically cannot have the same performance 😉 )

  11. icewind1991 commented on Dec 2, 2013

    @icewind1991
    Contributor

    On bigger installations even the user's root can already be mounted to e.g. a lokal SWIFT/OpenStack storage.

    That isn't as much of a problem because we only need to check one storage, if we were to check all storages in a folder there is no real limit to the amount of storages we need to check.

    Also there is a big difference in the folder you're currently browsing being out of date, or some folders in the webui having an out-dated mtime.
    I just don't think it's worth having any performance hit to solve the latter

  12. PVince81 commented on Jan 14, 2014

    @PVince81
    Contributor

    Not sure if related to this, but I found out that whenever I edit a file on a SMB storage, the change isn't picked up by the sync client. Every call from the sync client asks for changes in "files" which aren't there since the etag isn't affected by changed inside mountpoints.
    This also means that conflict detection doesn't work: whichever file is edited locally is uploaded by the sync client and will overwrite any changes in the SMB file, regardless whether that one was changed remotely or not.

    We need to find a good solution for this, as this makes syncing incompatible with external storages, which partly defeats the purpose of having external storages in the first place.

  13. PVince81 commented on Jan 14, 2014

    @PVince81
    Contributor

    (unless one doesn't use the sync client)

  14. PVince81 commented on Jan 14, 2014

    @PVince81
    Contributor

    The problem also exists if you modify files directly in the "data" dir, but inside a subdir.
    The changes made there aren't detected until the next time the user navigates into that dir in the UI, which forces a rescan and also magically make the sync client find them afterwards.

    It does seem that detecting external changes is difficult, especially when the change isn't directly in the root of the storage.

  15. 30 remaining items

  16. directict commented on Jun 7, 2015

    @directict

    We only use SMB for WEB access outside company + sharing with ppl outside our company, having it synchronised is not possible casue its never up2date on your laptop because changes are not seen by the client.

    Just wondering, how does the enterprise version do this? (in case of SMB?)

  17. khlem commented on Jun 8, 2015

    @khlem

    "Just wondering, how does the enterprise version do this? (in case of SMB?)"

    Same problem between enterprise and community version :( .

  18. directict commented on Jun 8, 2015

    @directict

    OK.. i thought in the enterprise edition it was not an issue... i meant the Windows Shares plugin in the enterprise, does this function have similar issues?

  19. khlem commented on Jun 8, 2015

    @khlem

    Nop i tested this version and the same error appears.

    I think, the core is the same between the community and enterprise edition.

  20. PVince81 commented on Jun 8, 2015

    @PVince81
    Contributor

    They are different plugins, but detecting remote updates is a general problem for every external storages, nothing specific to the plugin implementations, more something in core.

  21. directict commented on Jun 8, 2015

    @directict

    ok that makes sense thanks, in 8.1 there will be improvement right?

  22. PVince81 commented on Jun 8, 2015

    @PVince81
    Contributor

    8.1 will contain some new switches for external storages to tell how often the rescan needs to be done (never, detect changes (default), on every access).

    But I'm not sure whether this will fix update detection when someone changed a file very deep in the folder structure of an external storage (from outside ownCloud).

    @icewind1991 will the "Always" mode rescan the whole external storage regardless of update detection ?

  23. directict commented on Jun 8, 2015

    @directict

    Yes, i read everywhere that the SCAN function for SMB will not fix it indeed. its good to see you are working on this.. i think loads of people use ownCloud for SMB access.. atleast, thats what we like the most!

  24. icewind1991 commented on Jun 8, 2015

    @icewind1991
    Contributor

    8.1 will not fix this issue

  25. khlem commented on Jun 8, 2015

    @khlem

    This is not a good news.

    When do you think this issue will be resolved ?

    Same issue in enterprise version, we can't use the system with SMB/CIFS and Owncloud Client.

    Strange problem like this in a cloud system.

    Thank you for your efforts.

    Regards,

    Clément.

  26. PVince81 commented on Jun 9, 2015

    @PVince81
    Contributor

    The main ticket about update detection #11797 has been scheduled for 8.2, so there is hope.

  27. RobinMcCorkell commented on Aug 30, 2015

    @RobinMcCorkell
    Contributor

    We have a ticket about update detection -> close

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions