From c87bce67ac12ee37f8257efd02ab62fe19336b32 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 9 Dec 2009 16:58:51 +0000 Subject: QPID-2253 - Cluster node shuts down with inconsistent error. Add a missing memberUpdate on the transition to CATCHUP mode. The inconsistent error was caused because the newly updated member did not have its membership updated and so was missing an failover update message that the existing members sent to a new client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@888874 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Cluster.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index f9ad734d79..f877720350 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -600,6 +600,7 @@ void Cluster::setReady(Lock&) { void Cluster::initMapCompleted(Lock& l) { // Called on completion of the initial status map. + QPID_LOG(debug, *this << " initial status map complete. "); if (state == INIT) { // We have status for all members so we can make join descisions. initMap.checkConsistent(); @@ -705,10 +706,7 @@ void Cluster::initialStatus(const MemberId& member, uint32_t version, bool activ member, ClusterInitialStatusBody(ProtocolVersion(), version, active, id, store, shutdownId) ); - if (initMap.transitionToComplete()) { - QPID_LOG(debug, *this << " initial status map complete. "); - initMapCompleted(l); - } + if (initMap.transitionToComplete()) initMapCompleted(l); } void Cluster::ready(const MemberId& id, const std::string& url, Lock& l) { @@ -808,10 +806,11 @@ void Cluster::updateInRetracted() { checkUpdateIn(l); } -void Cluster::checkUpdateIn(Lock&) { +void Cluster::checkUpdateIn(Lock& l) { if (state != UPDATEE) return; // Wait till we reach the stall point. if (updatedMap) { // We're up to date map = *updatedMap; + memberUpdate(l); mcast.mcastControl(ClusterReadyBody(ProtocolVersion(), myUrl.str()), self); state = CATCHUP; discarding = false; // ok to set, we're stalled for update. -- cgit v1.2.1