From a49decc7d56bdb704a5d1580058c0da57e9a9353 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 22 Jun 2010 13:29:52 +0000 Subject: Fix cluster broker crashes when management is active. Cluser brokers were exiting with errors "modified cluster state outside cluster context" and "confirmed < (50+0) but only sent < (49+0)" Fix was to: - delay completion of incoming update till update connection closes. - delay addding new connections to managment until connection is announced. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@956882 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Connection.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/broker/Connection.h') diff --git a/cpp/src/qpid/broker/Connection.h b/cpp/src/qpid/broker/Connection.h index cf199fa831..8ad78f6652 100644 --- a/cpp/src/qpid/broker/Connection.h +++ b/cpp/src/qpid/broker/Connection.h @@ -79,9 +79,15 @@ class Connection : public sys::ConnectionInputHandler, virtual void connectionError(const std::string&) = 0; }; - Connection(sys::ConnectionOutputHandler* out, Broker& broker, const std::string& mgmtId, + Connection(sys::ConnectionOutputHandler* out, + Broker& broker, + const std::string& mgmtId, const qpid::sys::SecuritySettings&, - bool isLink = false, uint64_t objectId = 0, bool shadow=false); + bool isLink = false, + uint64_t objectId = 0, + bool shadow=false, + bool delayManagement = false); + ~Connection (); /** Get the SessionHandler for channel. Create if it does not already exist */ @@ -139,6 +145,9 @@ class Connection : public sys::ConnectionInputHandler, // Used by cluster to update connection status sys::AggregateOutput& getOutputTasks() { return outputTasks; } + /** Cluster delays adding management object in the constructor then calls this. */ + void addManagementObject(); + const qpid::sys::SecuritySettings& getExternalSecuritySettings() const { return securitySettings; @@ -166,6 +175,7 @@ class Connection : public sys::ConnectionInputHandler, boost::intrusive_ptr heartbeatTimer; boost::intrusive_ptr timeoutTimer; ErrorListener* errorListener; + uint64_t objectId; bool shadow; public: -- cgit v1.2.1