The recovery daemon pushes knowledge of recovery master election
progress/result to local daemon. It then retrieves that information
again.
Instead, have the recovery daemon reliably track election
progress/result in rec->recmaster so it doesn't need to be retrieved.
Be careful to maintain consistency by only doing this when the local
daemon has been updated.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
DEBUG(DEBUG_ERR, (__location__ " failed to send recmaster election request\n"));
return -1;
}
-
+ rec->recmaster = pnn;
/* send an election message to all active nodes */
DEBUG(DEBUG_INFO,(__location__ " Send election request to all active nodes\n"));
DEBUG(DEBUG_ERR, (__location__ " failed to send recmaster election request"));
return;
}
+ rec->recmaster = em->pnn;
return;
}