mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
mon: possible fix for rare problem where osd boot messages are double-logged.
From Sage.
This commit is contained in:
parent
883c6faaff
commit
a96af2ecc7
@ -433,6 +433,10 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m)
|
||||
pending_inc.new_down[from] = false;
|
||||
|
||||
paxos->wait_for_commit(new C_RetryMessage(this, m));
|
||||
} else if (pending_inc.new_up.count(from)) {
|
||||
// already prepared, just wait
|
||||
dout(7) << "prepare_boot already prepared, waiting on " << m->get_orig_source_addr() << dendl;
|
||||
paxos->wait_for_commit(new C_Booted(this, m, false));
|
||||
} else {
|
||||
// mark new guy up.
|
||||
down_pending_out.erase(from); // if any
|
||||
|
@ -93,11 +93,12 @@ private:
|
||||
struct C_Booted : public Context {
|
||||
OSDMonitor *cmon;
|
||||
MOSDBoot *m;
|
||||
C_Booted(OSDMonitor *cm, MOSDBoot *m_) :
|
||||
cmon(cm), m(m_) {}
|
||||
bool logit;
|
||||
C_Booted(OSDMonitor *cm, MOSDBoot *m_, bool l=true) :
|
||||
cmon(cm), m(m_), logit(l) {}
|
||||
void finish(int r) {
|
||||
if (r >= 0)
|
||||
cmon->_booted(m, true);
|
||||
cmon->_booted(m, logit);
|
||||
else
|
||||
cmon->dispatch((PaxosServiceMessage*)m);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user