In
98e23980f4ab7ba289303f72da06721c84767293 is_readable() was changed to
call is_active(), but that has a check for is_bootstrapping(), so there is
a semantic change.
As a result, we may fail PaxosService::is_readable() (due to bootstrapping)
and then try to call Paxos::wait_for_readable(). That will assert that
Paxos::is_readable() is false, but it will be true and we will crash.
Revert that part of the change, since the semantic change was not
intentional.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
bool is_readable(version_t ver = 0) {
if ((ver > get_last_committed())
|| ((!mon->is_peon() && !mon->is_leader()))
- || !is_active()
+ || (is_proposing() || paxos->is_recovering() || paxos->is_locked())
|| (get_last_committed() <= 0)
|| ((mon->get_quorum().size() != 1) && !paxos->is_lease_valid())) {
return false;