From 892e84f39a40a3868ca5630371784e883127f21a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 11 Jan 2010 17:23:18 +0000 Subject: Fix broker crash "confirmed N but only sent M" with managed agents running. The broker's ManagementAgent caches schemas from managed agents. This cache was not being replicated to new cluster members. If an agent such as sesame was running and connected to a newly-joined broker, that broker could send schema request messages which were not sent by other brokers that had the schema in cache. This resulted in the other brokers exiting with a "confirmed N but only sent M" message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@897955 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 3a5d121dc1..ea01dd6949 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -40,6 +40,7 @@ #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/log/Statement.h" +#include "qpid/management/ManagementAgent.h" #include @@ -478,5 +479,14 @@ void Connection::addQueueListener(const std::string& q, uint32_t listener) { findQueue(q)->getListeners().addListener(consumerNumbering[listener]); } +void Connection::managementSchema(const std::string& data) { + management::ManagementAgent* agent = cluster.getBroker().getManagementAgent(); + if (!agent) + throw Exception(QPID_MSG("Management schema update but no management agent.")); + framing::Buffer buf(const_cast(data.data()), data.size()); + agent->importSchemas(buf); + QPID_LOG(debug, cluster << " updated management schemas"); +} + }} // Namespace qpid::cluster -- cgit v1.2.1