we need to commit, not cancel, on record destruction
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Aug 2008 11:33:00 +0000 (21:33 +1000)
committerMichael Adam <obnox@samba.org>
Wed, 13 Aug 2008 09:54:09 +0000 (11:54 +0200)
(This used to be commit ba64a757f86fb60994e12e81416083ac0fa11c21)

source3/lib/dbwrap_ctdb.c

index d46b64dba59af4ec209fb2532284b7f4d6d39892..16c626632de530be76a841528cef216ade91b6be 100644 (file)
@@ -405,7 +405,10 @@ static int db_ctdb_record_destructor(struct db_record *rec)
 {
        struct db_ctdb_transaction_handle *h = talloc_get_type_abort(
                rec->private_data, struct db_ctdb_transaction_handle);
-       h->ctx->db->transaction_cancel(h->ctx->db);
+       int ret = h->ctx->db->transaction_commit(h->ctx->db);
+       if (ret != 0) {
+               DEBUG(0,(__location__ " transaction_commit failed\n"));
+       }
        return 0;
 }