This avoids a scenario like:
- _active()
- proposes value
- _commit()
- creates new pending, even though in updating state
Signed-off-by: Sage Weil <sage@newdream.net>
dout(7) << "_commit" << dendl;
update_from_paxos(); // notify service of new paxos state
- if (mon->is_leader()) {
+ if (mon->is_leader() && paxos->is_active()) {
dout(7) << "_commit creating new pending" << dendl;
if (!have_pending) {
create_pending();
update_from_paxos();
// create pending state?
- if (mon->is_leader()) {
+ if (mon->is_leader() && paxos->is_active()) {
+ dout(7) << "_active creating new pending" << dendl;
if (!have_pending) {
create_pending();
have_pending = true;