client: increase the rsn of the __transaction_lock__ when storing
authorMichael Adam <obnox@samba.org>
Wed, 2 Dec 2009 23:26:52 +0000 (00:26 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 4 Dec 2009 14:02:41 +0000 (15:02 +0100)
So that it is correctly handled by recoveries.
Also explicitly set the dmaster field to the current node's pnn.

Michael

client/ctdb_client.c

index 0b8cd5ba2e3e6e94ff0d63c7febb7379cbc073f3..d0a0e335f965a26261006c099b127331a9c0fc8d 100644 (file)
@@ -3245,6 +3245,8 @@ again:
        pid = getpid();
        data.dptr = (unsigned char *)&pid;
        data.dsize = sizeof(pid_t);
+       rh->header.rsn++;
+       rh->header.dmaster = ctdb_db->ctdb->pnn;
        ret = ctdb_ltdb_store(ctdb_db, key, &(rh->header), data);
        if (ret != 0) {
                DEBUG(DEBUG_ERR, (__location__ " Failed to store pid in "