diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-15 13:20:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-15 13:20:38 +0000 |
| commit | 2ecf9e8bf11fb6ee930b47b0e64e26624b965af3 (patch) | |
| tree | dacf07fbc3a5865c4ef276eafdc50f7b6c8f4b1b /bin | |
| parent | 46fc860dc1b339fde70dbe3e8d3d75abebb4144e (diff) | |
| parent | 961d615ce63002d99cd31d03c8c97228d9e453d3 (diff) | |
Merge "Allow archiving deleted rows to shadow tables, for performance."
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index c39c3e4eb..22549a50d 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -770,6 +770,17 @@ class DbCommands(object): """Print the current database version.""" print migration.db_version() + @args('--max_rows', dest='max_rows', metavar='<number>', + help='Maximum number of deleted rows to archive') + def archive_deleted_rows(self, max_rows=None): + """Move up to max_rows deleted rows from production tables to shadow + tables. + """ + if max_rows is not None: + max_rows = int(max_rows) + admin_context = context.get_admin_context() + db.archive_deleted_rows(admin_context, max_rows) + class InstanceTypeCommands(object): """Class for managing instance types / flavors.""" |
