You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/02/07 20:25:53 UTC
svn commit: r1443676 - /qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
Author: aconway
Date: Thu Feb 7 19:25:53 2013
New Revision: 1443676
URL: http://svn.apache.org/r1443676
Log:
QPID-4555: HA Don't shut down on deleting an exchange that is in use as an alternate.
Previously threw an exception in this case which shut down the broker.
Log warning instead, this is not a fatal event.
Modified:
qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp?rev=1443676&r1=1443675&r2=1443676&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp Thu Feb 7 19:25:53 2013
@@ -784,6 +784,15 @@ void BrokerReplicator::deleteQueue(const
void BrokerReplicator::deleteExchange(const std::string& name) {
try {
+ boost::shared_ptr<broker::Exchange> exchange = exchanges.find(name);
+ if (!exchange) {
+ QPID_LOG(warning, logPrefix << "Cannot delete exchange, not found: " << name);
+ return;
+ }
+ if (exchange->inUseAsAlternate()) {
+ QPID_LOG(warning, "Cannot delete exchange, in use as alternate: " << name);
+ return;
+ }
broker.deleteExchange(name, userId, remoteHost);
QPID_LOG(debug, logPrefix << "Exchange deleted: " << name);
} catch (const framing::NotFoundException&) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org