1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

when we get a lmaster request, skip updating the header when we are also the new dmaster

(This used to be ctdb commit 6c48dcc5df7b855fc8e0774c9572c7b2af618348)
This commit is contained in:
Andrew Tridgell 2007-04-17 16:35:28 +10:00
parent 040e69c1c4
commit 1a1aedf78f

View File

@ -266,6 +266,9 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
return;
}
/* if the new dmaster and the lmaster are the same node, then
we don't need to update the record header now */
if (c->dmaster != ctdb->vnn) {
/* fetch the current record */
ret = ctdb_ltdb_fetch(ctdb_db, key, &header, hdr, &data2);
if (ret != 0) {
@ -284,6 +287,7 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
ctdb_fatal(ctdb, "ctdb_req_dmaster unable to update dmaster");
return;
}
}
/* send the CTDB_REPLY_DMASTER */
len = offsetof(struct ctdb_reply_dmaster, data) + data.dsize;