diff options
author | Michael Goulish <mgoulish@apache.org> | 2012-08-06 20:04:58 +0000 |
---|---|---|
committer | Michael Goulish <mgoulish@apache.org> | 2012-08-06 20:04:58 +0000 |
commit | e4347cca011e0c7630e835bd96bc66b3e4e9a31c (patch) | |
tree | ba529b6f929ff140fdda5e89e1b35180530c8859 | |
parent | f8ffd3550ff419132e93e51374adcb4150d98f86 (diff) | |
download | qpid-python-e4347cca011e0c7630e835bd96bc66b3e4e9a31c.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@1369960 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/cluster/Cluster.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.cpp b/qpid/cpp/src/qpid/cluster/Cluster.cpp index 34aaf3d341..018c8b76ee 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,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(); |