Author: mgoulish
Date: Tue Aug 14 18:20:05 2012
New Revision: 1373004

URL: http://svn.apache.org/viewvc?rev=1373004&view=rev
Log:
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.

Modified:
    qpid/branches/0.18/qpid/cpp/src/qpid/cluster/Cluster.cpp

Modified: qpid/branches/0.18/qpid/cpp/src/qpid/cluster/Cluster.cpp
URL: 
http://svn.apache.org/viewvc/qpid/branches/0.18/qpid/cpp/src/qpid/cluster/Cluster.cpp?rev=1373004&r1=1373003&r2=1373004&view=diff
==============================================================================
--- qpid/branches/0.18/qpid/cpp/src/qpid/cluster/Cluster.cpp (original)
+++ qpid/branches/0.18/qpid/cpp/src/qpid/cluster/Cluster.cpp Tue Aug 14 
18:20:05 2012
@@ -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();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to