-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/remote/watcher: Fetch directories one by one (#2207)
When a directory is re-included in a Desktop client's synchronization, we need to manually fetch its content. We used to do so sub-directory by sub-directory but this would require a lot of fetch requests from the client on a large Cozy and could lead to client crashes. We then tried to fetch them layer by layer using a more complex Mango query. Unfortunately, these requests could not make use of CouchDB indexes and would be so slow on a large Cozy that we would never get a response before the request would time out. We're now trying a different approach. We'll fetch these sub-directories one by one but we won't fetch all of them before processing them. Instead, we'll merge a directory's direct content before fetching the next sibling. Sub-directories fetched in this process will be marked as needing a content fetch so we can resume from where we stopped in case the client is stopped.
- Loading branch information
Showing
10 changed files
with
257 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.