diff options
author | Michael Adam <obnox@samba.org> | 2014-02-14 22:05:21 +0100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2014-03-06 11:31:14 +1100 |
commit | 16837bc309aa9a86fc21d7f59a8fce0b947428a3 (patch) | |
tree | 3a0f5102d7f9d184a64dc95bc7f709adff0b30a8 /ctdb | |
parent | 6fdd25008f384408dfc103b90ab40b8e64ce18b0 (diff) | |
download | samba-16837bc309aa9a86fc21d7f59a8fce0b947428a3.tar.gz samba-16837bc309aa9a86fc21d7f59a8fce0b947428a3.tar.xz samba-16837bc309aa9a86fc21d7f59a8fce0b947428a3.zip |
ctdb-vacuum: remove VacuumLimit criterion for triggering a repack
With the new vacuuming, we consider it an error if there are
records left for deletion after processing the various lists.
All records that can be deleted should have been deleted by
tdb_delete calls.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_vacuum.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 137e8d67573..24d8cf9ecef 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -53,7 +53,6 @@ struct ctdb_vacuum_handle { /* a list of records to possibly delete */ struct vacuum_data { - uint32_t vacuum_limit; uint32_t repack_limit; struct ctdb_context *ctdb; struct ctdb_db_context *ctdb_db; @@ -1428,7 +1427,6 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db, bool full_vacuum_run) { uint32_t repack_limit = ctdb_db->ctdb->tunable.repack_limit; - uint32_t vacuum_limit = ctdb_db->ctdb->tunable.vacuum_limit; const char *name = ctdb_db->db_name; int freelist_size = 0; struct vacuum_data *vdata; @@ -1440,7 +1438,6 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db, } vdata->ctdb = ctdb_db->ctdb; - vdata->vacuum_limit = vacuum_limit; vdata->repack_limit = repack_limit; vdata->delete_list = trbt_create(vdata, 0); vdata->ctdb_db = ctdb_db; @@ -1471,8 +1468,7 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db, /* * decide if a repack is necessary */ - if ((repack_limit == 0 || (uint32_t)freelist_size < repack_limit) && - (vacuum_limit == 0 || vdata->delete_left < vacuum_limit)) + if ((repack_limit == 0 || (uint32_t)freelist_size < repack_limit)) { talloc_free(vdata); return 0; |