You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"hasUpdated" function is not being called from the OC root folder for mounted FSs #5036
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
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)
Add a new file to that external FS outside OC (don't use OC to upload the file)
Go to the OC root dir "/index.php/apps/files"
Check that the mtime of the "out" folder hasn't changed.
Go inside the "out" folder and back and check that the mtime is now the correct one
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
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.
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.
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 😉 )
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
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.
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.
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?)
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?
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.
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 ?
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!
Activity
DeepDiver1975 commentedon Sep 30, 2013
@icewind1991 any idea? Can you please have a look? THX
icewind1991 commentedon Sep 30, 2013
This is intended behavior,
hasUpdatedis 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 filesystemDeepDiver1975 commentedon Sep 30, 2013
Okay - but this will result in not up to date information like mtime
jvillafanez commentedon Oct 2, 2013
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.
DeepDiver1975 commentedon Oct 16, 2013
this is most probably related to etag propagation - this requires some more testing
karlitschek commentedon Nov 13, 2013
@PVince81 What do you think?
karlitschek commentedon Nov 25, 2013
@icewind1991 Can you look into this?
karlitschek commentedon Nov 29, 2013
@icewind1991 What do you think?
icewind1991 commentedon Dec 2, 2013
Calling
hasUpdatedon every storage in a folder would give a to large performance hit.Having a background job call
hashUpdatedorscanon 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.
DeepDiver1975 commentedon Dec 2, 2013
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 😉 )
icewind1991 commentedon Dec 2, 2013
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
PVince81 commentedon Jan 14, 2014
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.
PVince81 commentedon Jan 14, 2014
(unless one doesn't use the sync client)
PVince81 commentedon Jan 14, 2014
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.
30 remaining items
directict commentedon Jun 7, 2015
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?)
khlem commentedon Jun 8, 2015
"Just wondering, how does the enterprise version do this? (in case of SMB?)"
Same problem between enterprise and community version :( .
directict commentedon Jun 8, 2015
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?
khlem commentedon Jun 8, 2015
Nop i tested this version and the same error appears.
I think, the core is the same between the community and enterprise edition.
directict commentedon Jun 8, 2015
Ok, i thought those were 2 different plugins:
https://owncloud.com/features/#WindowsNetworkDrive
where the "SMB/CIFS" feature of the Community Edition is available here:
https://doc.owncloud.org/server/8.0/admin_manual/configuration_files/external_storage_configuration_gui.html#smb-cifs
PVince81 commentedon Jun 8, 2015
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.
directict commentedon Jun 8, 2015
ok that makes sense thanks, in 8.1 there will be improvement right?
PVince81 commentedon Jun 8, 2015
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 ?
directict commentedon Jun 8, 2015
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!
icewind1991 commentedon Jun 8, 2015
8.1 will not fix this issue
khlem commentedon Jun 8, 2015
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.
PVince81 commentedon Jun 9, 2015
The main ticket about update detection #11797 has been scheduled for 8.2, so there is hope.
RobinMcCorkell commentedon Aug 30, 2015
We have a ticket about update detection -> close