]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
we have to get a NEW generation id after completing recovery
authorRonnie Sahlberg <sahlberg@ronnie>
Fri, 11 May 2007 02:03:19 +0000 (12:03 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Fri, 11 May 2007 02:03:19 +0000 (12:03 +1000)
to solve a race condition with the logic to retransmit in
ctdb_call.c/ctdb_call_timeout()

(This used to be ctdb commit 1044ddca9ff5c434816de35d3f659aa182704e97)

ctdb/common/ctdb_client.c
ctdb/direct/ctdb_recoverd.c

index 9c4d84ad2914afb430ccc652982202473751792c..f1276014c489cda3b2c34cb4e1bb9b90036dee49 100644 (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;
        }
 
index 50dfd9eabe9717fe9919cc3120dfdf2d31cc8956..e2af852428ccb922bd744641f799237fa229e6df 100644 (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;