summaryrefslogtreecommitdiffstats
path: root/src/mon/PaxosService.cc
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-31 23:30:13 +0200
committerSage Weil <sage@inktank.com>2013-06-19 20:27:04 +0200
commit439e79969e3735012d0b9f17dde031b96d647551 (patch)
tree65e020ac449ca2c94bdffc3c81f533140cf202b0 /src/mon/PaxosService.cc
parentmon: simplify Monitor::init_paxos() (diff)
downloadceph-439e79969e3735012d0b9f17dde031b96d647551.tar.xz
ceph-439e79969e3735012d0b9f17dde031b96d647551.zip
mon: debug proposal timers
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/mon/PaxosService.cc')
-rw-r--r--src/mon/PaxosService.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mon/PaxosService.cc b/src/mon/PaxosService.cc
index b2a734a9b6c..fb704ca7a97 100644
--- a/src/mon/PaxosService.cc
+++ b/src/mon/PaxosService.cc
@@ -95,11 +95,11 @@ bool PaxosService::dispatch(PaxosServiceMessage *m)
} else {
// delay a bit
if (!proposal_timer) {
- dout(10) << " setting propose timer with delay of " << delay << dendl;
proposal_timer = new C_Propose(this);
+ dout(10) << " setting proposal_timer " << proposal_timer << " with delay of " << delay << dendl;
mon->timer.add_event_after(delay, proposal_timer);
} else {
- dout(10) << " propose timer already set" << dendl;
+ dout(10) << " proposal_timer already set" << dendl;
}
}
} else {
@@ -168,8 +168,9 @@ void PaxosService::propose_pending()
return;
if (proposal_timer) {
+ dout(10) << " canceling proposal_timer " << proposal_timer << dendl;
mon->timer.cancel_event(proposal_timer);
- proposal_timer = 0;
+ proposal_timer = NULL;
}
/**
@@ -224,6 +225,7 @@ void PaxosService::restart()
{
dout(10) << "restart" << dendl;
if (proposal_timer) {
+ dout(10) << " canceling proposal_timer " << proposal_timer << dendl;
mon->timer.cancel_event(proposal_timer);
proposal_timer = 0;
}
@@ -238,6 +240,7 @@ void PaxosService::election_finished()
dout(10) << "election_finished" << dendl;
if (proposal_timer) {
+ dout(10) << " canceling proposal_timer " << proposal_timer << dendl;
mon->timer.cancel_event(proposal_timer);
proposal_timer = 0;
}
@@ -307,6 +310,7 @@ void PaxosService::shutdown()
cancel_events();
if (proposal_timer) {
+ dout(10) << " canceling proposal_timer " << proposal_timer << dendl;
mon->timer.cancel_event(proposal_timer);
proposal_timer = 0;
}