diff options
| author | Alan Conway <aconway@apache.org> | 2012-10-12 18:38:53 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-10-12 18:38:53 +0000 |
| commit | 4886e2bcce72d99d34330c84ce33f6975f34b825 (patch) | |
| tree | 8c043a8ce41d251974af43ffc03a35bf172aed4c /cpp/src/qpid/ha/BrokerReplicator.cpp | |
| parent | 9fa42896bf3b21eb31534d193c0caa0802448e55 (diff) | |
| download | qpid-python-4886e2bcce72d99d34330c84ce33f6975f34b825.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/ha/BrokerReplicator.cpp')
| -rw-r--r-- | cpp/src/qpid/ha/BrokerReplicator.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
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<boost::shared_ptr<QueueReplicator> > 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<QueueReplicator> BrokerReplicator::startQueueReplicator( } void BrokerReplicator::deleteQueue(const std::string& name, bool purge) { - boost::shared_ptr<QueueReplicator> 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 |
