Skip to content

Caching remote discovery results #2976

Closed as not planned
Closed as not planned

Description

@guruz

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..

Something to chat about next week.

@ogoffart @dragotin @ckamm

Activity

  1. added this to the milestone on Mar 17, 2015
  2. MorrisJobke commented on Apr 1, 2015

    @MorrisJobke
    Contributor

    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.

  3. modified the milestones: , 2.0 - Multi-account on Jun 24, 2015
  4. removed this from the 2.1 milestone on Apr 4, 2017
  5. guruz commented on Apr 4, 2017

    @guruz
    ContributorAuthor

    @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?)

  6. reopened this on Apr 4, 2017
  7. added this to the 2.4.0 milestone on Apr 4, 2017
  8. ogoffart commented on Apr 4, 2017

    @ogoffart
    Contributor

    that cache already exists. It's called the database (sync journal)

  9. guruz commented on Apr 4, 2017

    @guruz
    ContributorAuthor
  10. guruz commented on Apr 5, 2017

    @guruz
    ContributorAuthor

    ...which means it could be flushed after a successful sync.

  11. guruz commented on Apr 5, 2017

    @guruz
    ContributorAuthor

    Similar how it was implemented before: 980c176

  12. dragotin commented on Apr 5, 2017

    @dragotin
    Contributor

    @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.

  13. 10 remaining items

  14. modified the milestones: 2.5.0, 2.6.0 on Mar 27, 2018
  15. self-assigned this
    on Jul 4, 2018
  16. modified the milestones: 2.6.0, 2.7.0 on Mar 25, 2019
  17. changed the title [-][Brainstorming] Discovery cache[/-] [+]Caching remote discovery results[/+] on Apr 11, 2019
  18. self-assigned this
    on Apr 11, 2019
  19. ckamm commented on Apr 11, 2019

    @ckamm
    Contributor

    I've started looking at this.

  20. ogoffart commented on Apr 11, 2019

    @ogoffart
    Contributor

    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

  21. ckamm commented on Apr 12, 2019

    @ckamm
    Contributor

    @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!

  22. modified the milestones: 2.7.0, Backlog on Mar 22, 2023
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