diff options
author | Greg Farnum <greg@inktank.com> | 2013-04-30 13:35:53 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-04-30 13:50:40 -0700 |
commit | a39bbdf32e95475fea0abb5758206387d283fdd0 (patch) | |
tree | d6aae39df10c5fcd602770fb4b10653c00ab34cd | |
parent | d00b4cd78364a77c4e3b1f986fcb07b45d38f398 (diff) | |
download | ceph-a39bbdf32e95475fea0abb5758206387d283fdd0.tar.gz |
mon: if we get our own sync_start back, drop it on the floor.
We have timeouts that will clean everything up, and this can happen
in some cases that we've decided are legitimate. Hopefully we'll
be able to do something else later.
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/mon/Monitor.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 11cad14979e..431cb5d239d 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -773,13 +773,6 @@ void Monitor::handle_sync_start(MMonSync *m) { dout(10) << __func__ << " " << *m << dendl; - /** - * This looks a bit odd, but we've seen cases where sync start messages - * get bounced around and end up at the originator without anybody - * noticing! - */ - assert(m->reply_to != messenger->get_myinst()); - /* If we are not the leader, then some monitor picked us as the point of * entry to the quorum during its synchronization process. Therefore, we * have an obligation of forwarding this message to leader, so the sender @@ -822,6 +815,20 @@ void Monitor::handle_sync_start(MMonSync *m) assert(quorum.empty()); assert(sync_leader.get() != NULL); + /** + * This looks a bit odd, but we've seen cases where sync start messages + * get bounced around and end up at the originator without anybody + * noticing!* If it happens, just drop the message and the timeouts + * will clean everything up -- eventually. + * [*] If a leader gets elected who is too far behind, he'll drop into + * bootstrap and sync, but the person he sends his sync to thinks he's + * still the leader and forwards the reply back. + */ + if (m->reply_to == messenger->get_myinst()) { + m->put(); + return; + } + dout(10) << __func__ << " forward " << *m << " to our sync leader at " << sync_leader->entity << dendl; |