ctdb-vacuum: treat value 0 of tunable VacuumLimit as turning off repacking
authorMichael Adam <obnox@samba.org>
Wed, 12 Feb 2014 16:41:28 +0000 (17:41 +0100)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 6 Mar 2014 00:31:14 +0000 (11:31 +1100)
I.e. no number of records found to delete will trigger the
repacking.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_vacuum.c

index 100377ee8addbe9850e89deea4ca646c0871d6ce..137e8d67573b67e999216c6da0e1f3113b9c3594 100644 (file)
@@ -1472,7 +1472,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) &&
-           vdata->delete_left < vacuum_limit)
+           (vacuum_limit == 0 || vdata->delete_left < vacuum_limit))
        {
                talloc_free(vdata);
                return 0;