Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database life cycle management #22

Open
uniqueg opened this issue Aug 24, 2018 · 1 comment
Open

Database life cycle management #22

uniqueg opened this issue Aug 24, 2018 · 1 comment
Labels
flag: good 1st issue Good for newcomers priority: low Low priority type: maintenance Related to general repository maintenance workload: hours Likely takes hours to resolve

Comments

@uniqueg
Copy link
Member

uniqueg commented Aug 24, 2018

Is your feature request related to a problem? Please describe.
Currently data is stored in the database indefinitely. But depending on the use case, this may not always be desired by a given user/administrator. Users/admins thus should have the option to clean up the database, and relevant parameters should be configurable.

Describe the solution you'd like
Implement a service that periodically checks records in database collections and deletes records that are too old. Alternatively, or in addition, old records exceeding a specified limit of records are automatically deleted upon given operations (such as a POST request to the /runs API endpoint). Add relevant parameters (periodicity of checks/delete operations, maximum number and/or maximum age of records etc.) to config file app/config.yaml.

Describe alternatives you've considered
None, at this point.

Additional context
Not applicable.

@uniqueg
Copy link
Member Author

uniqueg commented Aug 24, 2018

MongoDB supports capped collections, by size and by number of documents. See here: https://docs.mongodb.com/manual/reference/method/db.createCollection/
In case of overflow, the oldest records are removed first.

@uniqueg uniqueg added priority: low Low priority type: maintenance Related to general repository maintenance workload: hours Likely takes hours to resolve flag: good 1st issue Good for newcomers labels Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: good 1st issue Good for newcomers priority: low Low priority type: maintenance Related to general repository maintenance workload: hours Likely takes hours to resolve
Projects
None yet
Development

No branches or pull requests

1 participant