]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-vacuum: Remove unnecessary check for zero records in delete list
authorAmitay Isaacs <amitay@gmail.com>
Wed, 14 Feb 2018 04:23:07 +0000 (15:23 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 8 Oct 2018 00:46:21 +0000 (02:46 +0200)
Since no records are deleted from RB tree during step 1, there is no
need for the check.  Run step 2 unconditionally.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_vacuum.c

index 8faf803efb91a42df90ac93ff28d4466798d3f80..2194b7f4da75619195355b7fd979264ffe8e6236 100644 (file)
@@ -854,10 +854,6 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db,
                }
        }
 
-       if (vdata->count.delete_list.left == 0) {
-               goto success;
-       }
-
        /*
         * Step 2:
         * Delete the remaining records locally.
@@ -873,8 +869,6 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db,
                      "delete list for deletion.\n"));
        }
 
-success:
-
        if (vdata->count.delete_list.left != 0) {
                DEBUG(DEBUG_ERR, (__location__ " Vaccum db[%s] error: "
                      "there are %u records left for deletion after "