diff options
author | Sage Weil <sage@newdream.net> | 2011-11-21 10:33:53 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-11-21 10:33:53 -0800 |
commit | 811145f7586907673bfc26ac837e31d1ce4315b6 (patch) | |
tree | 5fe4634792ee0fe05b16508cb632639108303339 | |
parent | f60702822ab7681e6b53b31d04913ecf9eb9a7bd (diff) | |
download | ceph-811145f7586907673bfc26ac837e31d1ce4315b6.tar.gz |
paxosservice: tolerate _active() call when not active
This can happen when multiple C_Active events are queued, and the first
does a propose_pending() (moving us into updating state).
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | src/mon/PaxosService.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc index bcba8e98afb..399fd071977 100644 --- a/src/mon/PaxosService.cc +++ b/src/mon/PaxosService.cc @@ -156,8 +156,12 @@ void PaxosService::election_finished() void PaxosService::_active() { + if (!paxos->is_active()) { + dout(10) << "_active - not active" << dendl; + paxos->wait_for_active(new C_Active(this)); + return; + } dout(10) << "_active" << dendl; - assert(paxos->is_active()); // pull latest from paxos update_from_paxos(); |