nextcloud / nextcloud/server

Don't require mount setup for etag/mtime propagation.

Open
#57,350 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

To propagate etag and mtimes across storages, the filesystem code will load the mounts that are nested inside a folder (any depth) and use those mounts to calculate the etag/mtime of a folder.

Because of this, there are cases where we're doing a lot of work to setup the various mounts, to then only use them to fetch the root metadata.

Since the oc_mounts table records the fileid of the root of the mounts, we could instead use that to collect the fileid of the nested mounts we need, and fetch the data directly from the filecache, without having to setup the actual mounts.

Some considerations:

  • When listing a directory, we need to ensure we only do this logic once for all relevant folders at once, not for every sub-folder individually.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the filesystem code that propagates etags and mtimes, including the oc_mounts table, nested mount roots, and filecache lookups. Check the directory-listing path to understand how relevant folders are processed together; done means root metadata is fetched without setting up unnecessary mounts and the logic runs once for a listing rather than once per sub-folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.