diff options
author | Alan Conway <aconway@apache.org> | 2012-09-25 20:49:33 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-09-25 20:49:33 +0000 |
commit | 7356e5f508658bdba40c865c4a29b54c8566d560 (patch) | |
tree | 922953738515964656ea6e8ab83c91012841412f /cpp/src/qpid/ha/ReplicationTest.cpp | |
parent | 4635ead8e8ff61dc5861e16476c16c75e7270240 (diff) | |
download | qpid-python-7356e5f508658bdba40c865c4a29b54c8566d560.tar.gz |
QPID-4325: HA Starting from persistent store
When re-starting a persistent HA cluster, the broker that becomes primary should
keep its store data while all the backup brokers should discard their store data
and catch up from the primary. Backups cannot simply use their own stores
because sequence numbers of stored messages will not match on all brokers. The
backup erases individual queues and exchanges as the catch-up process gets to
them.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1390123 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/ha/ReplicationTest.cpp')
-rw-r--r-- | cpp/src/qpid/ha/ReplicationTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/ha/ReplicationTest.cpp b/cpp/src/qpid/ha/ReplicationTest.cpp index 88a969dbfd..1dd32262a0 100644 --- a/cpp/src/qpid/ha/ReplicationTest.cpp +++ b/cpp/src/qpid/ha/ReplicationTest.cpp @@ -20,6 +20,7 @@ */ #include "ReplicationTest.h" #include "qpid/broker/Queue.h" +#include "qpid/broker/Exchange.h" #include "qpid/framing/FieldTable.h" namespace qpid { @@ -71,5 +72,10 @@ bool ReplicationTest::isReplicated(ReplicateLevel level, const broker::Queue& q) return isReplicated(level, q.getSettings().storeSettings, q.isAutoDelete(), q.hasExclusiveOwner()); } +bool ReplicationTest::isReplicated(ReplicateLevel level, const broker::Exchange& ex) +{ + return replicateLevel(ex.getArgs()) >= level; +} + }} // namespace qpid::ha |