nextcloud / nextcloud/server

Recover Orphans from ObjectStore

Open
#34,509 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 2. developing enhancement feature: object storage
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

The idea is to improve the management of objects from ObjectStorage and helps administrator to manage orphans that might appears on a de-sync between the table filecache and the objects stored on S3.

The development of this feature can be split in 3 steps:

first step:

  • an occ command to list Orphans (by comparing the Objects available on the Storage and the one available in the table filecache),
  • an occ command to delete Orphan by its ex-fileId.

second step:

  • add metadata (filename, owner, ...) about the current local file for each entries of the ObjectStore,
  • manage metadata on file creation, on file rename, on ownership transfer,
  • an occ command to get metadata from the ObjectStore about a file, from its [ex-]fileId

third step:

  • an occ command to recover an Orphan by creating a fresh entry in the table filecache
  • an occ command to fill metadata of objects from the ObjectStore without metadata, based on local information from filecache

side note: the occ command to list Orphans should be able to also compare filesize and fix the data from the table filecache.

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 mapping the three proposed steps across ObjectStorage, the filecache table, and occ command entry points, beginning with how stored objects are compared with filecache records. Done means the agreed scope covers orphan listing, deletion, metadata handling, recovery, and the proposed filesize comparison or repair behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, php
Domain
backend, cloud, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.