diff options
author | Martin Schwenke <martin@meltin.net> | 2013-11-15 15:20:40 +1100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-11-27 18:46:16 +0100 |
commit | efc77ba6ac14a79a00c51395bd9600e11bca739c (patch) | |
tree | 0fe99b87be0d6acaa315ef82466289af440c1787 /ctdb/server | |
parent | 4ea721b2c16597432dcf517170f7859c713d063e (diff) | |
download | samba-efc77ba6ac14a79a00c51395bd9600e11bca739c.tar.gz samba-efc77ba6ac14a79a00c51395bd9600e11bca739c.tar.xz samba-efc77ba6ac14a79a00c51395bd9600e11bca739c.zip |
ctdb-recoverd: For persistent databases a sequence number of 0 is valid
Otherwise recovery ends up done by RSN when it is unnecessary.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb/server')
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 6820ec92f2..70ed87e355 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -739,7 +739,8 @@ static void pull_seqnum_cb(struct ctdb_context *ctdb, uint32_t node_pnn, int32_t seqnum = *((uint64_t *)outdata.dptr); - if (seqnum > cb_data->seqnum) { + if (seqnum > cb_data->seqnum || + (cb_data->pnn == -1 && seqnum == 0)) { cb_data->seqnum = seqnum; cb_data->pnn = node_pnn; } @@ -802,7 +803,7 @@ static int pull_highest_seqnum_pdb(struct ctdb_context *ctdb, return -1; } - if (cb_data->seqnum == 0 || cb_data->pnn == -1) { + if (cb_data->pnn == -1) { DEBUG(DEBUG_NOTICE, ("Failed to find a node with highest sequence numbers for DB 0x%08x\n", dbid)); talloc_free(tmp_ctx); return -1; |