From 4886e2bcce72d99d34330c84ce33f6975f34b825 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 12 Oct 2012 18:38:53 +0000 Subject: QPID-4369: HA backup brokers core dump in benchmark test. Was seeing core dumps with QueueReplicator::queue == 0. Caused by race conditions when calling QueueReplicator::deactivate. Renamed deactivate to destroy and call it only when the broker::Queue is destroyed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1397676 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/ha/BrokerReplicator.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'cpp/src/qpid/ha/BrokerReplicator.cpp') diff --git a/cpp/src/qpid/ha/BrokerReplicator.cpp b/cpp/src/qpid/ha/BrokerReplicator.cpp index c9b9664821..48d5b71134 100644 --- a/cpp/src/qpid/ha/BrokerReplicator.cpp +++ b/cpp/src/qpid/ha/BrokerReplicator.cpp @@ -277,14 +277,7 @@ void collectQueueReplicators( } } // namespace -void BrokerReplicator::shutdown() { - QPID_LOG(debug, logPrefix << "BrokerReplicator shutting down."); - set > collect; - broker.getExchanges().eachExchange( - boost::bind(&collectQueueReplicators, _1, boost::ref(collect))); - for_each(collect.begin(), collect.end(), - boost::bind(&QueueReplicator::deactivate, _1)); -} +void BrokerReplicator::shutdown() {} // This is called in the connection IO thread when the bridge is started. void BrokerReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHandler) { @@ -672,8 +665,6 @@ boost::shared_ptr BrokerReplicator::startQueueReplicator( } void BrokerReplicator::deleteQueue(const std::string& name, bool purge) { - boost::shared_ptr qr(findQueueReplicator(name)); - if (qr) qr->deactivate(); Queue::shared_ptr queue = broker.getQueues().find(name); if (queue) { // Purge before deleting to ensure that we don't reroute any -- cgit v1.2.1