From ee83554e46565e532595b72ffcec70a257576d0c Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Tue, 30 Sep 2008 14:57:32 +0000 Subject: QPID-1306 This patch includes: - Optimistic Consume - Support for forcing Queue durable on cluster failure - Some cleanup on mgnt functions in Queue to inlines - Tests Still coming - header for client queue options - LVQ support bits. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@700489 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Cluster.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/cluster/Cluster.cpp') diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index 7feee4ce14..b48443526c 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -22,6 +22,7 @@ #include "qpid/broker/Broker.h" #include "qpid/broker/SessionState.h" #include "qpid/broker/Connection.h" +#include "qpid/broker/QueueRegistry.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/ClusterDumpRequestBody.h" #include "qpid/framing/ClusterUpdateBody.h" @@ -71,7 +72,8 @@ Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker& b) : handler(&joiningHandler), joiningHandler(*this), memberHandler(*this), - mcastId() + mcastId(), + lastSize(1) { ManagementAgent* agent = ManagementAgent::Singleton::getInstance(); if (agent != 0){ @@ -332,7 +334,17 @@ void Cluster::stopFullCluster(void) { void Cluster::updateMemberStats() { if (mgmtObject) { - mgmtObject->set_clusterSize(size()); + if (lastSize != size() && size() ==1){ + QPID_LOG(info, "Last node standing, updating queue policies, size:" < 1) { + QPID_LOG(info, "Recover back from last node standing, updating queue policies, size:" <set_clusterSize(size()); std::vector vectUrl = getUrls(); string urlstr; for(std::vector::iterator iter = vectUrl.begin(); iter != vectUrl.end(); iter++ ) { -- cgit v1.2.1