summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Goulish <mgoulish@apache.org>2012-08-14 18:20:05 +0000
committerMichael Goulish <mgoulish@apache.org>2012-08-14 18:20:05 +0000
commitdf615e8e70f12bbdb8c92b73ed3ebea61427888a (patch)
tree93bdd59b3ad68b998a420be0b07a905a2215e27b
parentf295d9ec83062d3e7fc1d75184129618fc7da3f8 (diff)
downloadqpid-python-df615e8e70f12bbdb8c92b73ed3ebea61427888a.tar.gz
QPID-4194 : re-enable queue events in CATCHUP state.
pavel moravec's fix -- without this, newbie broker with a replication queue will not replicate messages received during CATCHUP. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.18@1373004 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/cluster/Cluster.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.cpp b/qpid/cpp/src/qpid/cluster/Cluster.cpp
index 34aaf3d341..4aab3381b1 100644
--- a/qpid/cpp/src/qpid/cluster/Cluster.cpp
+++ b/qpid/cpp/src/qpid/cluster/Cluster.cpp
@@ -615,7 +615,6 @@ void Cluster::configChange (
void Cluster::setReady(Lock&) {
state = READY;
mcast.setReady();
- broker.getQueueEvents().enable();
enableClusterSafe(); // Enable cluster-safe assertions.
}
@@ -979,6 +978,12 @@ void Cluster::checkUpdateIn(Lock& l) {
map = *updatedMap;
mcast.mcastControl(ClusterReadyBody(ProtocolVersion(), myUrl.str()), self);
state = CATCHUP;
+ /* In CATCHUP mode the update has finished, and we are consuming
+ ** whatever backlog of messages has built up during the update.
+ ** We should enable queue events here, or messages that are received
+ ** during this phase will not be replicated properly. ( If there are
+ ** relevant replication queues. ) */
+ broker.getQueueEvents().enable();
memberUpdate(l);
// Must be called *after* memberUpdate() to avoid sending an extra update.
failoverExchange->setReady();