if (uncommitted_v == last_committed+1 &&
uncommitted_value.length()) {
dout(10) << "that's everyone. begin on old learned value" << dendl;
- state = STATE_PREPARING | STATE_LOCKED;
+ state = STATE_LOCKED;
begin(uncommitted_value);
} else {
// active!
<< dendl;
assert(mon->is_leader());
- assert(is_preparing());
- state &= ~STATE_PREPARING;
state |= STATE_UPDATING;
// we must already have a majority for this to work.
assert(is_active());
assert(!proposals.empty());
- state = STATE_PREPARING;
-
C_Proposal *proposal = static_cast<C_Proposal*>(proposals.front());
assert(!proposal->proposed);
list_proposals(*_dout);
*_dout << dendl;
+ state = 0;
begin(proposal->bl);
}
* Leader/Peon is updating to a new value.
*/
const static int STATE_UPDATING = 0x04;
- /**
- * Leader is about to propose a new value, but hasn't gotten to do it yet.
- */
- const static int STATE_PREPARING = 0x08;
const static int STATE_LOCKED = 0x10;
} else if (s & STATE_UPDATING) {
ss << "updating";
assert(!(s & ~(STATE_UPDATING|STATE_LOCKED)));
- } else if (s & STATE_PREPARING) {
- ss << "preparing update";
- assert(!(s & ~(STATE_PREPARING|STATE_LOCKED)));
} else {
assert(0 == "We shouldn't have gotten here!");
}
*/
bool is_updating() const { return (state & STATE_UPDATING); }
- bool is_preparing() const { return (state & STATE_PREPARING); }
bool is_locked() const { return (state & STATE_LOCKED); }
private: