From: Ronnie Sahlberg Date: Fri, 11 May 2007 02:03:19 +0000 (+1000) Subject: we have to get a NEW generation id after completing recovery X-Git-Tag: tevent-0.9.20~348^2~2723^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c9bb4bb444edb0dd795a7a9d14042274b5c5a7f;p=thirdparty%2Fsamba.git 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) --- diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c index 9c4d84ad291..f1276014c48 100644 --- a/ctdb/common/ctdb_client.c +++ b/ctdb/common/ctdb_client.c @@ -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; } diff --git a/ctdb/direct/ctdb_recoverd.c b/ctdb/direct/ctdb_recoverd.c index 50dfd9eabe9..e2af852428c 100644 --- a/ctdb/direct/ctdb_recoverd.c +++ b/ctdb/direct/ctdb_recoverd.c @@ -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;