From 740b9e005927fbb26b030a09dc25ee147c598da3 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 14 Jun 2012 00:47:39 +0000 Subject: QPID-3603: Bug fixes to HA code, passing test_failover_send_receive - Updated HA logging messages to conform to new [Category] log format. - QueueGuard fencepost error, set firstSafe correctly - ReplicatingSubscription passing correct broker info to getGuard() - Don't remove RemoteBackups on disconnect: fixes race where backup rejects connection but primary sees closed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1350069 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/ha/RemoteBackup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/ha/RemoteBackup.cpp') diff --git a/cpp/src/qpid/ha/RemoteBackup.cpp b/cpp/src/qpid/ha/RemoteBackup.cpp index 4f79537113..bcf7be2297 100644 --- a/cpp/src/qpid/ha/RemoteBackup.cpp +++ b/cpp/src/qpid/ha/RemoteBackup.cpp @@ -32,7 +32,7 @@ using sys::Mutex; RemoteBackup::RemoteBackup( const BrokerInfo& info, broker::Broker& broker, ReplicationTest rt, bool cg) : - logPrefix("HA primary, backup to "+info.getLogId()+": "), brokerInfo(info), replicationTest(rt), + logPrefix("Primary remote backup "+info.getLogId()+": "), brokerInfo(info), replicationTest(rt), createGuards(cg) { QPID_LOG(debug, logPrefix << "Guarding queues for backup broker."); @@ -85,11 +85,13 @@ void RemoteBackup::ready(const QueuePtr& q) { if (isReady()) QPID_LOG(debug, logPrefix << "All queues ready"); } +// Called via ConfigurationObserver void RemoteBackup::queueCreate(const QueuePtr& q) { if (createGuards && replicationTest.isReplicated(ALL, *q)) guards[q].reset(new QueueGuard(*q, brokerInfo)); } +// Called via ConfigurationObserver void RemoteBackup::queueDestroy(const QueuePtr& q) { initialQueues.erase(q); GuardMap::iterator i = guards.find(q); -- cgit v1.2.1