Delete archived records instantly
Bug #1852121 reported by
Mohammed Naser
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
At the moment, in order to clean up a database, you will have to archive first and then run the delete afterwards.
If the operator doesn't care about the ability of restoring deleted instances, it means that the archive step is useless for them.
It would be nice if we added an option to archive to simply purge directly instead of archive (then use purge records command afterwards).
Changed in nova: | |
status: | New → Triaged |
Changed in nova: | |
assignee: | nobody → Rajesh Tailor (ratailor) |
Changed in nova: | |
assignee: | Rajesh Tailor (ratailor) → nobody |
To post a comment you must log in.
The archive_ deleted_ rows command already has a --purge option on it so you can do it in a single run:
https:/ /docs.openstack .org/nova/ latest/ cli/nova- manage. html#nova- database
nova-manage db archive_ deleted_ rows --until-complete --purge
So the "it would be nice" part here is skipping archive to make getting to the purge part faster?
Has anyone looked at how long the archive takes compared to the purge and if it's worthwhile to refactor all of that code to not archive? Seems to me like it's not really worth the trouble in refactoring the code especially when you can just run this thing in a background cron.