vacuum: use insert_record_into_delete_queue in ctdb_local_schedule_for_deletion.
authorMichael Adam <obnox@samba.org>
Fri, 11 Mar 2011 14:57:45 +0000 (15:57 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 11 Mar 2011 15:04:54 +0000 (16:04 +0100)
This is to take advantage of the hash collision handling and logging
also in ctdb_local_schedule_for_deletion.

server/ctdb_vacuum.c

index e34627cf9f5d1a39155da42f6dfc84b3b57cfb5a..5be946af0e224d2d66f96fbaf6dea2b352e311d9 100644 (file)
@@ -1360,14 +1360,9 @@ int32_t ctdb_local_schedule_for_deletion(struct ctdb_db_context *ctdb_db,
 
        if (ctdb_db->ctdb->ctdbd_pid == getpid()) {
                /* main daemon - directly queue */
-               ret = insert_delete_record_data_into_tree(ctdb_db->ctdb,
-                                                         ctdb_db,
-                                                         ctdb_db->delete_queue,
-                                                         hdr, key);
-               if (ret != 0) {
-                       return -1;
-               }
-               return 0;
+               ret = insert_record_into_delete_queue(ctdb_db, hdr, key);
+
+               return ret;
        }
 
        /* child process: send the main daemon a control */