From 0f86c796ccb052fa6c5f807f480a1feabec643f8 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 22 Nov 2010 16:15:06 +0000 Subject: QPID-2956: cluster broker exits with "error deliveryRecord no update message." The following sequence of events was causing a broker joining the cluster to shutdown: - a client acquires or browses a message with TTL set. - the message expires. - a new broker joins before the client has acknowledged the message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1037763 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/UpdateClient.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 54c5fa0bcc..bc1b812a94 100644 --- a/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/cpp/src/qpid/cluster/UpdateClient.cpp @@ -272,8 +272,7 @@ class MessageUpdater { // Send the expiry ID if necessary. if (message.payload->getProperties()->getTtl()) { boost::optional expiryId = expiry.getId(*message.payload); - if (!expiryId) return; // Message already expired, don't replicate. - ClusterConnectionProxy(session).expiryId(*expiryId); + ClusterConnectionProxy(session).expiryId(expiryId?*expiryId:0); } // We can't send a broker::Message via the normal client API, @@ -408,7 +407,8 @@ void UpdateClient::updateSession(broker::SessionHandler& sh) { QPID_LOG(debug, updaterId << " updating unacknowledged messages."); broker::DeliveryRecords& drs = ss->getSemanticState().getUnacked(); - std::for_each(drs.begin(), drs.end(), boost::bind(&UpdateClient::updateUnacked, this, _1)); + std::for_each(drs.begin(), drs.end(), + boost::bind(&UpdateClient::updateUnacked, this, _1)); updateTxState(ss->getSemanticState()); // Tx transaction state. -- cgit v1.2.1