nextcloud / nextcloud/server

eTag for metadata changes

Open
#8,477 24 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

2. developing client: 🤖🍏 mobile enhancement feature: dav feature: tags high performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Updated version:

Provide an eTag for metadata changes (favorite, share, note, etc).
Currently clients (Android / iOS) check for changed eTag when entering a folder.
If this is the same with stored database no real propfind to list folder content is needed.
However if e.g. a new sharee was added, we still need to retrieve it. Therefore we check every time(!)
/ocs/v2.php/apps/files_sharing/api/v1/shares

This has multiple drawbacks

  • more server load
  • more client load
  • UX on client side is not ideal, as sharees are delayed until info is fetched, seeing a spinner

On next android version we wanted to rely on changed eTags when syncing a folder:

  • enter a folder
  • check remote eTag with locally stored eTag
  • refresh content only if eTag differs

The problem now is that with this approach we do not get info about favorited/unfavorited folders. (encrypted/not encrypted I have not checked yet).

In my opinion at least the parent folder should then have a changed eTag to reflect that something has changed.

@skjnldsv @icewind1991

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 with the /ocs/v2.php/apps/files_sharing/api/v1/shares entry point and the existing eTag behavior used when entering or syncing a folder. Define how favorite, share, and note changes affect the parent folder eTag, while still allowing new sharees to be detected. Done means clients can avoid an unnecessary content refresh when the eTag is unchanged and observe the relevant metadata changes when it differs.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.