ctdb-vacuum: catch and log error of traverse in ctdb_process_delete_queue()
authorMichael Adam <obnox@samba.org>
Sat, 15 Feb 2014 16:59:22 +0000 (17:59 +0100)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 6 Mar 2014 00:31:14 +0000 (11:31 +1100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_vacuum.c

index 7d2a6b4a870f541bcc29365242bfe8a4df884b11..a491703288f5889f29e0f1ce0d489fe80dc377e7 100644 (file)
@@ -673,8 +673,15 @@ static void ctdb_process_delete_queue(struct ctdb_db_context *ctdb_db,
                                      struct vacuum_data *vdata)
 {
        uint32_t sum;
+       int ret;
+
+       ret = trbt_traversearray32(ctdb_db->delete_queue, 1,
+                                  delete_queue_traverse, vdata);
 
-       trbt_traversearray32(ctdb_db->delete_queue, 1, delete_queue_traverse, vdata);
+       if (ret != 0) {
+               DEBUG(DEBUG_ERR, (__location__ " Error traversing "
+                     "the delete queue.\n"));
+       }
 
        sum = vdata->fast_deleted
            + vdata->fast_skipped