s3:dbwrap_ctdb: set dmaster in ctdb_transaction_store() also when updating an existin...
authorMichael Adam <obnox@samba.org>
Fri, 11 Sep 2009 11:23:34 +0000 (13:23 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 11 Sep 2009 13:39:53 +0000 (15:39 +0200)
not only when creating a record.

This matches commit e9194a130327d6b05a8ab90bd976475b0e93b06d from ctdb-master.

Michael

source3/lib/dbwrap_ctdb.c

index e38f76fcf6e910d39885229475a177495182918e..07dde1e408720b9a59e8199880a29d47d7f1abbf 100644 (file)
@@ -478,7 +478,6 @@ static int db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
                   This is only safe because we are in a transaction and this
                   is a persistent database */
                ZERO_STRUCT(header);
-               header.dmaster = get_my_vnn();
        } else {
                memcpy(&header, rec.dptr, sizeof(struct ctdb_ltdb_header));
                rec.dsize -= sizeof(struct ctdb_ltdb_header);
@@ -492,6 +491,7 @@ static int db_ctdb_transaction_store(struct db_ctdb_transaction_handle *h,
                SAFE_FREE(rec.dptr);
        }
 
+       header.dmaster = get_my_vnn();
        header.rsn++;
 
        if (!h->in_replay) {