IntelLabs / IntelLabs/vdms

Autoreplicate May Consume All Local Storage Space

Open
#185 0 comments 0 reactions 0 assignees View on GitHub
Bug Priority: Backlog
Dominant language
C++
Stars
93
Forks
34
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Autoreplicate creates a local tarball of the the database data and metadata at a set time interval.

However, there are no checks for how often this runs, nor any infrastructure for rotating/removing old database backups. Because of this, a misconfiguration (or just a very long running server with a large database) can potentially consume all the available space in the target location silently.

**To Reproduce**

At configuration time, set a small number for the autoreplicate interval, (e.g. 5) with the units in seconds.

for example:

```
{
"port": 55555,
"autoreplicate_interval":5, // it should be > 0
"unit":"s",
"max_simultaneous_clients": 100,
// "backup_path":"backups_test", // set this if you want different path to store the back up file
"db_root_path": "db",
"backup_flag" : "false",
"storage_type": "local", //local, aws, etc
"bucket_name": "minio-bucket",
"more-info": "github.com/IntelLabs/vdms"
}
```

This will generate a new tarball every 5 seconds, until the server is killed.

**Expected behavior**

Ideally we should have some guardrails to prevent over-aggressive runs of the autoreplication thread (e.g. a loud warning or a graceful crash if we have an interval of a few seconds) as well as some defaults number of maximum snapshots/backups to be maintained and automatically removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.