From 6f734e4aa938dccdc1c79e782908a0d1164ee526 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 1 Jul 2009 13:47:04 +0000 Subject: Fix members joining cluster while cluster is handling client errors. Previously cluster members could abort if a new member joins while existing members are handling a client error. Now if an update offer arrives while an error is in progress, the offering broker retracts the offer and the newcomer must try again. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790163 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/cluster/Connection.cpp') diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 2db8879eb5..c129ecbd65 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -309,6 +309,12 @@ void Connection::membership(const FieldTable& joiners, const FieldTable& members self.second = 0; // Mark this as completed update connection. } +void Connection::retractOffer() { + QPID_LOG(debug, cluster << " incoming update retracted on connection " << *this); + cluster.updateInRetracted(); + self.second = 0; // Mark this as completed update connection. +} + bool Connection::isLocal() const { return self.first == cluster.getId() && self.second; } @@ -435,13 +441,13 @@ void Connection::queue(const std::string& encoded) { QPID_LOG(debug, cluster << " decoded queue " << q->getName()); } -void Connection::sessionError(uint16_t , const std::string& ) { - cluster.flagError(*this, ERROR_TYPE_SESSION); +void Connection::sessionError(uint16_t , const std::string& msg) { + cluster.flagError(*this, ERROR_TYPE_SESSION, msg); } -void Connection::connectionError(const std::string& ) { - cluster.flagError(*this, ERROR_TYPE_CONNECTION); +void Connection::connectionError(const std::string& msg) { + cluster.flagError(*this, ERROR_TYPE_CONNECTION, msg); } }} // namespace qpid::cluster -- cgit v1.2.1