diff options
author | Alan Conway <aconway@apache.org> | 2009-12-09 16:58:51 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-12-09 16:58:51 +0000 |
commit | c87bce67ac12ee37f8257efd02ab62fe19336b32 (patch) | |
tree | b2dd6b7752ecb9efdfd3003fe83f0efbf982d223 /cpp/src | |
parent | 84c5cd72cfa3eac53f889ae140c913fae4aa61c3 (diff) | |
download | qpid-python-c87bce67ac12ee37f8257efd02ab62fe19336b32.tar.gz |
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
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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. |