From 82091ce825923252d7a224ebf771be61e8dd15a2 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 30 Jun 2009 20:51:38 +0000 Subject: Fix cluster race condition with connections closed by broker while in use. If a client is using a connection that is closed at the broker end because of an error, there is a race condition that allows the connection to be incorrectly re-created on replica brokers which can cause those brokers to exit with an error that does not occur on the directly connected broker. The fix: explicitly announce new connections, shadow connections are no longer implicitly created on first use. Make error-check a cluster control so it can be handled independently of the lifecycle of the connection where an error initially occured. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@789947 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 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 42cb9556fb..2db8879eb5 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -38,7 +38,6 @@ #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" -#include "qpid/framing/ClusterConnectionErrorCheckBody.h" #include "qpid/log/Statement.h" #include @@ -55,7 +54,7 @@ namespace qpid { namespace cluster { using namespace framing; -using namespace framing::cluster_connection; +using namespace framing::cluster; qpid::sys::AtomicValue Connection::catchUpId(0x5000000000000000LL); @@ -445,19 +444,5 @@ void Connection::connectionError(const std::string& ) { cluster.flagError(*this, ERROR_TYPE_CONNECTION); } -void Connection::errorCheck(uint8_t type, uint64_t frameSeq) { - // If we handle an errorCheck at this point (rather than in the - // ErrorCheck class) then we have processed succesfully past the - // point of the error so respond with ERROR_TYPE_NONE - if (type != ERROR_TYPE_NONE) { // Don't respond to NONE. - QPID_LOG(debug, cluster << " error " << frameSeq << " on " << *this - << " did not occur locally."); - cluster.getMulticast().mcastControl( - ClusterConnectionErrorCheckBody( - ProtocolVersion(), ERROR_TYPE_NONE, frameSeq), self); - } -} - - }} // namespace qpid::cluster -- cgit v1.2.1