diff options
author | Michael Goulish <mgoulish@apache.org> | 2010-06-15 14:07:53 +0000 |
---|---|---|
committer | Michael Goulish <mgoulish@apache.org> | 2010-06-15 14:07:53 +0000 |
commit | b96ff8258cb248717addd9855333e499d301bcfd (patch) | |
tree | d1cb8c686f48e91317649211ad8b2e909b6fd509 /cpp | |
parent | f9888f3d0da0589c17ac48107cc7f2da21b2379c (diff) | |
download | qpid-python-b96ff8258cb248717addd9855333e499d301bcfd.tar.gz |
This change is a partial fix for the problem of long cluster failovers. This change addresses part of that problem: long newbie-broker catchup times.
At this time, it looks as though there are two distinct mechanisms causing these long catchup times. They roughly divide into a population of times less than 20 seconds, and a population of much longer times (up to hundreds of seconds).
This fix addresses only the shorter times. In a test of 25 failovers before and after the change, it reduced those times by an average of nearly 50%. A T-test on the times indicates that the likelihood of the observed change happening randomly is less than 2%.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954895 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index 6b9fceccd9..9ca6fbf2bf 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -444,8 +444,10 @@ void Cluster::deliveredEvent(const Event& e) { EventFrame ef(e, e.getFrame()); // Stop the deliverEventQueue on update offers. // This preserves the connection decoder fragments for an update. + // Only do this for the two brokers that are directly involved in this + // offer: the one making the offer, or the one receiving it. const ClusterUpdateOfferBody* offer = castUpdateOffer(ef.frame.getBody()); - if (offer) { + if (offer && ( e.getMemberId() == self || MemberId(offer->getUpdatee()) == self) ) { QPID_LOG(info, *this << " stall for update offer from " << e.getMemberId() << " to " << MemberId(offer->getUpdatee())); deliverEventQueue.stop(); |