s3:dbwrap: remove m_all marshall buffer from ctdb transaction.
authorGregor Beck <gbeck@sernet.de>
Fri, 23 Sep 2011 09:58:35 +0000 (11:58 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 12 Oct 2011 03:20:36 +0000 (05:20 +0200)
it was only used by ctdb_replay_transaction and was a actually write only

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 12 05:20:36 CEST 2011 on sn-devel-104

source3/lib/dbwrap/dbwrap_ctdb.c

index 95c23eeb42562082aa032eed15daacd828f36718..85ae5c1c6e502b4ebd047583e2a7e7524cb2172a 100644 (file)
 struct db_ctdb_transaction_handle {
        struct db_ctdb_ctx *ctx;
        /*
-        * we store the reads and writes done under a transaction:
-        * - one list stores both reads and writes (m_all),
-        * - the other just writes (m_write)
+        * we store the writes done under a transaction:
         */
-       struct ctdb_marshall_buffer *m_all;
        struct ctdb_marshall_buffer *m_write;
        uint32_t nesting;
        bool nested_cancel;
@@ -490,16 +487,6 @@ static int db_ctdb_transaction_fetch(struct db_ctdb_ctx *db,
                return -1;
        }
 
-       h->m_all = db_ctdb_marshall_add(h, h->m_all, h->ctx->db_id, 1, key,
-                                       NULL, *data);
-       if (h->m_all == NULL) {
-               DEBUG(0,(__location__ " Failed to add to marshalling "
-                        "record\n"));
-               data->dsize = 0;
-               talloc_free(data->dptr);
-               return -1;
-       }
-
        return 0;
 }
 
@@ -676,15 +663,6 @@ static NTSTATUS db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
        header.dmaster = get_my_vnn();
        header.rsn++;
 
-       h->m_all = db_ctdb_marshall_add(h, h->m_all, h->ctx->db_id, 0, key,
-                                       NULL, data);
-       if (h->m_all == NULL) {
-               DEBUG(0,(__location__ " Failed to add to marshalling "
-                        "record\n"));
-               talloc_free(tmp_ctx);
-               return NT_STATUS_NO_MEMORY;
-       }
-
        h->m_write = db_ctdb_marshall_add(h, h->m_write, h->ctx->db_id, 0, key, &header, data);
        if (h->m_write == NULL) {
                DEBUG(0,(__location__ " Failed to add to marshalling record\n"));