From 30133c25a10861ca9e589e22c13bea4dd99f4c0f Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 21 Jun 2012 16:05:09 +0000 Subject: QPID-4082: cluster de-sync after broker restart & queue replication Having queue state replication between 2 clusters, restarting a broker in both source+destination clusters sometimes leads to cluster de-sync. No QMF communication is involved, though symptoms are similar to the bug caused by missing propagation of QMF errors within a cluster. The bug is caused by "deliveryCount" in SemanticState::ConsumerImpl (qpid/broker/SemanticState.cpp) not being replicated to a joining cluster node during catch-up. When the elder broker in src.cluster sends session.sync() after sending 5 messages (per --ack 5 in qpid-route), the recently joiner node in src.cluster does not do so, what leads to the cluster de-sync. The patch: - adds to "consumer-state" method (see xml/cluster.xml file change) to update a new joi-ner a new property deliveryCount - updates cluster::Connection::consumerState to send deliveryCount to the method - updates cluster::Connection::consumerState to set the received deliveryCount - add two methods to broker::SemanticState::ConsumerImpl for getting and setting deliveryCount git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1352588 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/UpdateClient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/cluster/UpdateClient.cpp') diff --git a/cpp/src/qpid/cluster/UpdateClient.cpp b/cpp/src/qpid/cluster/UpdateClient.cpp index d1b9a65e14..53818aed85 100644 --- a/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/cpp/src/qpid/cluster/UpdateClient.cpp @@ -547,7 +547,8 @@ void UpdateClient::updateConsumer( ci->isNotifyEnabled(), ci->getPosition(), ci->getCredit().used().messages, - ci->getCredit().used().bytes + ci->getCredit().used().bytes, + ci->getDeliveryCount() ); consumerNumbering.add(ci.get()); -- cgit v1.2.1