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
What about caching discovery results in the journal?
Normally this should not be needed as we're always syncing all files/dirs and storing the proper ETag in the journal.
However in practice I think there's often issues like fatal sync errors, network timeouts etc which then on the next sync mean a complete re-discovery..
Currently we noticed some problems with randomly broken connections to an LDAP server. So the user backend can't properly hand back the home directory. To avoid random guessing what the correct home directory could be we hand back an exception (owncloud/core#15332). In this case the sync client also could see such responses (that will cause a HTTP 500). If this happens during discovery the whole discovery process is aborted and starts from scratch.(and maybe never finished because of this) Is it possible to just repeat the last (failed) request (because it is likely that the error was just temporarily caused) and then resume the discovery from that point? We maybe should improve the error message that is handed back to say "this was just a temporary error and could be fixed with the next request". (503 with Retry-After header)
That would make the client a bit more robust for these cases.
The infinity PROPFIND could be implemented by having it fill a local cache.
map (remote_dirName+ETag)->contents
The issue was originaly about any discovery issue. It would also help with flaky network connections, basically everytime when the discovery would abort.
This should be implemented in a way to not fill so much memory again. (e.g. sqlite3?)
@ogoffart 💟 @guruz isn't it true that we only do real propfinds into a tree if the ETag of the directory has changed, and read from the client journal instead if not?
IIRC what we discussed long time ago was to keep the entire tree in memory to not have to rebuild the whole tree again, maybe that should be discussed again.
@ogoffart Yeah, anything that reduces time between server query and writing to the db would do, and parallel propagation would have other advantages. Need to deal with deletes though. Let's discuss!
Activity
MorrisJobke commentedon Apr 1, 2015
Currently we noticed some problems with randomly broken connections to an LDAP server. So the user backend can't properly hand back the home directory. To avoid random guessing what the correct home directory could be we hand back an exception (owncloud/core#15332). In this case the sync client also could see such responses (that will cause a HTTP 500). If this happens during discovery the whole discovery process is aborted and starts from scratch.(and maybe never finished because of this) Is it possible to just repeat the last (failed) request (because it is likely that the error was just temporarily caused) and then resume the discovery from that point? We maybe should improve the error message that is handed back to say "this was just a temporary error and could be fixed with the next request". (503 with Retry-After header)
That would make the client a bit more robust for these cases.
guruz commentedon Apr 4, 2017
@ogoffart @ckamm @jturcotte @PVince81 @DeepDiver1975 Now that we're thinking of doing the recursive/infinity PROPFIND I'm wondering if it makes sense to think about this again.
The infinity PROPFIND could be implemented by having it fill a local cache.
map (remote_dirName+ETag)->contents
The issue was originaly about any discovery issue. It would also help with flaky network connections, basically everytime when the discovery would abort.
This should be implemented in a way to not fill so much memory again. (e.g. sqlite3?)
ogoffart commentedon Apr 4, 2017
that cache already exists. It's called the database (sync journal)
guruz commentedon Apr 4, 2017
guruz commentedon Apr 5, 2017
...which means it could be flushed after a successful sync.
guruz commentedon Apr 5, 2017
Similar how it was implemented before: 980c176
dragotin commentedon Apr 5, 2017
@ogoffart 💟
@guruz isn't it true that we only do real propfinds into a tree if the ETag of the directory has changed, and read from the client journal instead if not?
IIRC what we discussed long time ago was to keep the entire tree in memory to not have to rebuild the whole tree again, maybe that should be discussed again.
10 remaining items
[-][Brainstorming] Discovery cache[/-][+]Caching remote discovery results[/+]ckamm commentedon Apr 11, 2019
I've started looking at this.
ogoffart commentedon Apr 11, 2019
I think it would be better to do the discovery and propagation in parallel
Now that the discovery has been refactored, it should be easier.
Then the cache wouldn't make sense anymore
ckamm commentedon Apr 12, 2019
@ogoffart Yeah, anything that reduces time between server query and writing to the db would do, and parallel propagation would have other advantages. Need to deal with deletes though. Let's discuss!