summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-12-09 16:58:51 +0000
committerAlan Conway <aconway@apache.org>2009-12-09 16:58:51 +0000
commit5720d502cfe7d570f3f6ac8f0f510709182e70e8 (patch)
tree122cdcadca23797c5523fe589105b7847d37f144 /qpid/cpp
parentb3e71b9a75040e86a74b55db1ce03a9ee1a64191 (diff)
downloadqpid-python-5720d502cfe7d570f3f6ac8f0f510709182e70e8.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@888874 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/cluster/Cluster.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.cpp b/qpid/cpp/src/qpid/cluster/Cluster.cpp
index f9ad734d79..f877720350 100644
--- a/qpid/cpp/src/qpid/cluster/Cluster.cpp
+++ b/qpid/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.