]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
we must bump the rsn everytime we do a REQ_DMASTER or a REPLY_DMASTER
authorRonnie Sahlberg <sahlberg@ronnie>
Thu, 10 May 2007 20:08:17 +0000 (06:08 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Thu, 10 May 2007 20:08:17 +0000 (06:08 +1000)
to make sure that the "merge records based on rsn during recovery" will
merge correctly.

this is extra important since samba3 never bumps the record when it
writes new data to it !

(This used to be ctdb commit 857e67204065603592c2dbbadbd8667ebba9ccdb)

ctdb/common/ctdb_call.c

index 8dd03449a8ff2f670704c9c806951245c0ed6162..76bc570c536efa765f75c35c8bf7b045e6143b2e 100644 (file)
@@ -221,7 +221,7 @@ static void ctdb_send_dmaster_reply(struct ctdb_db_context *ctdb_db,
 
        r->hdr.destnode  = new_dmaster;
        r->hdr.reqid     = reqid;
-       r->rsn           = header->rsn;
+       r->rsn           = header->rsn + 1;
        r->keylen        = key.dsize;
        r->datalen       = data.dsize;
        r->db_id         = ctdb_db->db_id;
@@ -263,7 +263,7 @@ static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db,
        r->hdr.destnode  = lmaster;
        r->hdr.reqid     = c->hdr.reqid;
        r->db_id         = c->db_id;
-       r->rsn           = header->rsn;
+       r->rsn           = header->rsn + 1;
        r->dmaster       = c->hdr.srcnode;
        r->keylen        = key->dsize;
        r->datalen       = data->dsize;