1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

we have to get a NEW generation id after completing recovery

to solve a race condition with the logic to retransmit in
ctdb_call.c/ctdb_call_timeout()

(This used to be ctdb commit 1044ddca9ff5c434816de35d3f659aa182704e97)
This commit is contained in:
Ronnie Sahlberg 2007-05-11 12:03:19 +10:00
parent 7769a2d45e
commit 0c9bb4bb44
2 changed files with 2 additions and 1 deletions

View File

@ -891,7 +891,7 @@ int ctdb_ctrl_setrecmode(struct ctdb_context *ctdb, struct timeval timeout, uint
CTDB_CONTROL_SET_RECMODE, 0, data,
ctdb, &outdata, &res, &timeout);
if (ret != 0 || res != 0) {
DEBUG(0,(__location__ " ctdb_control for getrecmode failed\n"));
DEBUG(0,(__location__ " ctdb_control for setrecmode failed\n"));
return -1;
}

View File

@ -426,6 +426,7 @@ static int do_recovery(struct ctdb_context *ctdb, struct event_context *ev,
/* build a new vnn map with all the currently active nodes */
generation = random();
vnnmap = talloc(mem_ctx, struct ctdb_vnn_map);
CTDB_NO_MEMORY(ctdb, vnnmap);
vnnmap->generation = generation;