diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-03-18 11:24:55 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-03-18 11:24:55 -0700 |
| commit | ada496b5cc123fca2913be8b73097934f528cec8 (patch) | |
| tree | da5c46004219db89e58333e92efd6ea38d38e876 /ovsdb/ovsdb-tool.c | |
| parent | afe20d5c7092f31943e32ff2b9d99526fbfbc6cd (diff) | |
| download | openvswitch-ada496b5cc123fca2913be8b73097934f528cec8.tar.gz | |
ovsdb: Compact databases online automatically and on-demand.
If the database grows fairly large, and we've written a fair number of
transactions to it, and it's been a while since the database was compacted,
then (after the next commit) compact the database.
Also, compact the database online if the "ovsdb-server/compact" command is
issued via unixctl. I suspect that this feature will rarely if ever be
used in practice, but it's easier to test than compacting automatically.
Bug #2391.
Diffstat (limited to 'ovsdb/ovsdb-tool.c')
| -rw-r--r-- | ovsdb/ovsdb-tool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index dedc179df..1c9e9206a 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -207,7 +207,7 @@ compact_or_convert(const char *src_name, const char *dst_name, /* Save a copy. */ check_ovsdb_error(new_schema ? ovsdb_file_open_as_schema(src_name, new_schema, &db) - : ovsdb_file_open(src_name, true, &db)); + : ovsdb_file_open(src_name, true, &db, NULL)); check_ovsdb_error(ovsdb_file_save_copy(dst_name, false, comment, db)); ovsdb_destroy(db); @@ -248,7 +248,7 @@ transact(bool read_only, const char *db_file_name, const char *transaction) struct json *request, *result; struct ovsdb *db; - check_ovsdb_error(ovsdb_file_open(db_file_name, read_only, &db)); + check_ovsdb_error(ovsdb_file_open(db_file_name, read_only, &db, NULL)); request = parse_json(transaction); result = ovsdb_execute(db, request, 0, NULL); |
