nextcloud / nextcloud/server

Mark object store bucket as full and move new files into new bucket

Open
#22,039 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem
  • the vendors of object stores give out a recommendation the maximum number of objects per bucket
  • Nextcloud should respect those limits and if a bucket is close to this value it should not put more files into it
  • new files should be put into a newly created bucket
  • multibucket setups should be able to be marked as "extensible" - so there is a default bucket count and as it's capacity of a bucket is reached then a new bucket is created
Things to keep in mind
  • we should look into storing the bucket a file is located in instead of calculate it on the fly:
    • instead of having this implicitly (calculating the hash and have a formula in which bucket this hash goes) we should store the result in the database so we can move different files that would be in the same bucket can also be moved based on the amount of files in the bucket
  • what about a migration? this would allow to rebalance buckets that are already over this limit and misbehave for that reason

@rullzer @kesselb @icewind1991 Feedback and ideas are welcome.

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

The issue names no files, tests, or entry points. Start by tracing how Nextcloud currently selects buckets for object-store files, then investigate how bucket assignments and migrations could be represented. Done should cover capacity-based bucket creation, file placement, extensible multibucket setups, and migration or rebalancing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, cloud, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.