summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMichael Goulish <mgoulish@apache.org>2012-08-06 20:04:58 +0000
committerMichael Goulish <mgoulish@apache.org>2012-08-06 20:04:58 +0000
commit71c2cb8d6fc0f2c86dd60f256d90c448993ec45d (patch)
treedab7665027f0a7c3497a0a6452001fdf72521d7b /cpp/src
parentc6fdf32f79759994e75ecae09072b202e1ac9c2e (diff)
downloadqpid-python-71c2cb8d6fc0f2c86dd60f256d90c448993ec45d.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/trunk/qpid@1369960 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/cluster/Cluster.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp
index 34aaf3d341..018c8b76ee 100644
--- a/cpp/src/qpid/cluster/Cluster.cpp
+++ b/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,13 @@ 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();