diff options
| author | Alan Conway <aconway@apache.org> | 2010-03-08 17:34:09 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-03-08 17:34:09 +0000 |
| commit | c1266e53dd9c20447f658b050fb789d4f0f9ab12 (patch) | |
| tree | 513716e9b9b97f57c5493a9ec2e5186ef78c811e /cpp/src/qpid/cluster | |
| parent | b97d2e0e9246a19eb155a38b9b06a9550ceb06aa (diff) | |
| download | qpid-python-c1266e53dd9c20447f658b050fb789d4f0f9ab12.tar.gz | |
QPID-2436: Fix cluster update of remote agents.
The v2key of cluster agents was not being passed as part of a cluster update.
This meant they were not being associated with the correct shadow connections on
the updatee. This caused inconsistencies that shut down the new broker.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@920414 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster')
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 8 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 6 | ||||
| -rw-r--r-- | cpp/src/qpid/cluster/InitialStatusMap.h | 9 |
3 files changed, 16 insertions, 7 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index b6ee2db362..92e2b65fe2 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -198,8 +198,12 @@ struct ClusterDispatcher : public framing::AMQP_AllOperations::ClusterHandler { framing::cluster::StoreState(storeState), shutdownId, firstConfig, l); } - void ready(const std::string& url) { cluster.ready(member, url, l); } - void configChange(const std::string& current) { cluster.configChange(member, current, l); } + void ready(const std::string& url) { + cluster.ready(member, url, l); + } + void configChange(const std::string& current) { + cluster.configChange(member, current, l); + } void updateOffer(uint64_t updatee) { cluster.updateOffer(member, updatee, l); } diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 6385729a09..1166f685d2 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -542,7 +542,7 @@ void Connection::addQueueListener(const std::string& q, uint32_t listener) { void Connection::managementSchema(const std::string& data) { management::ManagementAgent* agent = cluster.getBroker().getManagementAgent(); if (!agent) - throw Exception(QPID_MSG("Management schema update but no management agent.")); + throw Exception(QPID_MSG("Management schema update but management not enabled.")); framing::Buffer buf(const_cast<char*>(data.data()), data.size()); agent->importSchemas(buf); QPID_LOG(debug, cluster << " updated management schemas"); @@ -557,7 +557,7 @@ void Connection::managementSetupState(uint64_t objectNum, uint16_t bootSequence) << objectNum << " seq " << bootSequence); management::ManagementAgent* agent = cluster.getBroker().getManagementAgent(); if (!agent) - throw Exception(QPID_MSG("Management schema update but no management agent.")); + throw Exception(QPID_MSG("Management schema update but management not enabled.")); agent->setNextObjectId(objectNum); agent->setBootSequence(bootSequence); } @@ -565,7 +565,7 @@ void Connection::managementSetupState(uint64_t objectNum, uint16_t bootSequence) void Connection::managementAgents(const std::string& data) { management::ManagementAgent* agent = cluster.getBroker().getManagementAgent(); if (!agent) - throw Exception(QPID_MSG("Management agents update but no management agent.")); + throw Exception(QPID_MSG("Management agent update but management not enabled.")); framing::Buffer buf(const_cast<char*>(data.data()), data.size()); agent->importAgents(buf); QPID_LOG(debug, cluster << " updated management agents"); diff --git a/cpp/src/qpid/cluster/InitialStatusMap.h b/cpp/src/qpid/cluster/InitialStatusMap.h index 26a99fa0b0..eedc99b0b2 100644 --- a/cpp/src/qpid/cluster/InitialStatusMap.h +++ b/cpp/src/qpid/cluster/InitialStatusMap.h @@ -31,6 +31,11 @@ namespace cluster { /** * Track status of cluster members during initialization. + * + * When a new member joins the CPG cluster, all members send an initial-status + * control. This map tracks those controls and provides data to make descisions + * about joining the cluster. + * */ class InitialStatusMap { @@ -38,7 +43,7 @@ class InitialStatusMap typedef framing::ClusterInitialStatusBody Status; InitialStatusMap(const MemberId& self, size_t size); - /** Process a config change. @return true if we need to re-send our status */ + /** Process a config change. May make isResendNeeded() true. */ void configChange(const MemberSet& newConfig); /** @return true if we need to re-send status */ bool isResendNeeded(); @@ -52,7 +57,7 @@ class InitialStatusMap bool transitionToComplete(); /**@pre isComplete(). @return this node's elders */ MemberSet getElders() const; - /**@pre isComplete(). @return True if we need an update. */ + /**@pre isComplete(). @return True if we need to request an update. */ bool isUpdateNeeded(); /**@pre isComplete(). @return Cluster-wide cluster ID. */ framing::Uuid getClusterId(); |
