summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/ha/Primary.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-10-09 19:52:24 +0000
committerAlan Conway <aconway@apache.org>2012-10-09 19:52:24 +0000
commita769439c2e8bc10e33292e87008204a0d6c20059 (patch)
treef09fc24ca604c87b9343dd084f098cff00c65d8a /cpp/src/qpid/ha/Primary.cpp
parenta12252bbafc72607e11aad13a8cb1e86ffc5d30f (diff)
downloadqpid-python-a769439c2e8bc10e33292e87008204a0d6c20059.tar.gz
QPID-4360: Fix test bug: Non-ready HA broker can be incorrectly promoted to primary.
Test test_delete_missing_response was failing with "cluster active, cannot promote". - Fixed test bug: "fake" primary triggered "cannot promote". - Backup: always create QueueReplicator if not already existing. - Terminology change: "initial" queues -> "catch-up" queues. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1396244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/ha/Primary.cpp')
-rw-r--r--cpp/src/qpid/ha/Primary.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qpid/ha/Primary.cpp b/cpp/src/qpid/ha/Primary.cpp
index 4057f4dcde..bdb1a66a83 100644
--- a/cpp/src/qpid/ha/Primary.cpp
+++ b/cpp/src/qpid/ha/Primary.cpp
@@ -93,7 +93,7 @@ Primary::Primary(HaBroker& hb, const BrokerInfo::Set& expect) :
new RemoteBackup(*i, haBroker.getReplicationTest(), false));
backups[i->getSystemId()] = backup;
if (!backup->isReady()) expectedBackups.insert(backup);
- backup->setInitialQueues(hb.getBroker().getQueues(), true); // Create guards
+ backup->setCatchupQueues(hb.getBroker().getQueues(), true); // Create guards
}
// Set timeout for expected brokers to connect and become ready.
sys::Duration timeout(int64_t(hb.getSettings().backupTimeout*sys::TIME_SEC));
@@ -207,7 +207,7 @@ void Primary::opened(broker::Connection& connection) {
{
// Avoid deadlock with queue registry lock.
Mutex::ScopedUnlock u(lock);
- backup->setInitialQueues(haBroker.getBroker().getQueues(), false);
+ backup->setCatchupQueues(haBroker.getBroker().getQueues(), false);
}
backups[info.getSystemId()] = backup;
}