mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
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>
This commit is contained in:
parent
4ea721b2c1
commit
efc77ba6ac
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user