Files
opencloud/services/storage-users/pkg/config
Pascal Bleser 7676730860 feat: 1419: configure the revision cleanup of the storage-users drivers
Wire reva's revision cleanup options into the 'decomposed', 'decomposeds3'
and 'posix' drivers, in the storage provider and in the data provider.

The options are a single 'revisions_cleanup' section of the storage-users
configuration, next to 'filemetadata_cache' and 'id_cache', as only one
driver is used at a time. Its environment variables:

- STORAGE_USERS_REVISIONS_CLEANUP_STRATEGY: which old revisions to
  delete whenever a file gets a new revision, e.g. 'auto', '30d' or
  '7d, auto, 90d'
- STORAGE_USERS_REVISIONS_CLEANUP_ASYNC: run the cleanup in background
  workers
- STORAGE_USERS_REVISIONS_CLEANUP_ASYNC_WORKERS: number of background
  workers
- STORAGE_USERS_REVISIONS_CLEANUP_ASYNC_QUEUE_SIZE: number of files that
  can wait
- STORAGE_USERS_REVISIONS_CLEANUP_ASYNC_QUEUE_FULL: 'drop' or 'block'
- STORAGE_USERS_REVISIONS_CLEANUP_ASYNC_QUEUE_FULL_TIMEOUT: how long
  'block' waits for room at most, 0 for as long as it takes

The strategy defaults to 'disabled', which keeps all revisions as before.
The other defaults are reva's: background workers, with the number of
workers and the queue size determined automatically, dropping the
cleanup of a file when the queue is full (it is cleaned up with its
next revision), and a timeout of 5s for 'block'.

Other commands that create a driver, 'posixfs scan' and 'uploads
sessions', clean up revisions without background workers: they could
exit before the workers are done, and stop the cleanup of a file
midway.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-23 23:59:43 +01:00
..
2025-01-14 12:48:01 +01:00