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 2012/08/01 20:03:44 UTC
svn commit: r1368145 - in /qpid/branches/0.18/qpid/cpp/src/qpid/ha:
BrokerReplicator.cpp HaBroker.cpp QueueReplicator.cpp QueueReplicator.h
Author: aconway
Date: Wed Aug 1 18:03:43 2012
New Revision: 1368145
URL: http://svn.apache.org/viewvc?rev=1368145&view=rev
Log:
Revert "WIP: BrokerReplicator, QueueReplicator error handling."
This reverts commit r1367543, which was committed by accident.
Modified:
qpid/branches/0.18/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
qpid/branches/0.18/qpid/cpp/src/qpid/ha/HaBroker.cpp
qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.h
Modified: qpid/branches/0.18/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.18/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp?rev=1368145&r1=1368144&r2=1368145&view=diff
==============================================================================
--- qpid/branches/0.18/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp (original)
+++ qpid/branches/0.18/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp Wed Aug 1 18:03:43 2012
@@ -299,12 +299,10 @@ void BrokerReplicator::route(Deliverable
} catch (const std::exception& e) {
QPID_LOG(critical, logPrefix << "Configuration failed: " << e.what()
<< ": while handling: " << list);
- haBroker.shutdown();
throw;
}
}
-
void BrokerReplicator::doEventQueueDeclare(Variant::Map& values) {
Variant::Map argsMap = asMapVoid(values[ARGS]);
bool autoDel = values[AUTODEL].asBool();
@@ -544,7 +542,7 @@ void BrokerReplicator::startQueueReplica
{
if (replicationTest.replicateLevel(queue->getSettings()) == ALL) {
boost::shared_ptr<QueueReplicator> qr(
- new QueueReplicator(haBroker, queue, link));
+ new QueueReplicator(haBroker.getBrokerInfo(), queue, link));
if (!broker.getExchanges().registerExchange(qr))
throw Exception(QPID_MSG("Duplicate queue replicator " << qr->getName()));
qr->activate();
Modified: qpid/branches/0.18/qpid/cpp/src/qpid/ha/HaBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.18/qpid/cpp/src/qpid/ha/HaBroker.cpp?rev=1368145&r1=1368144&r2=1368145&view=diff
==============================================================================
--- qpid/branches/0.18/qpid/cpp/src/qpid/ha/HaBroker.cpp (original)
+++ qpid/branches/0.18/qpid/cpp/src/qpid/ha/HaBroker.cpp Wed Aug 1 18:03:43 2012
@@ -193,7 +193,7 @@ Manageable::status_t HaBroker::Managemen
link->setUrl(url);
// Create a queue replicator
boost::shared_ptr<QueueReplicator> qr(
- new QueueReplicator(*this, queue, link));
+ new QueueReplicator(brokerInfo, queue, link));
qr->activate();
broker.getExchanges().registerExchange(qr);
break;
Modified: qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.cpp?rev=1368145&r1=1368144&r2=1368145&view=diff
==============================================================================
--- qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.cpp (original)
+++ qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.cpp Wed Aug 1 18:03:43 2012
@@ -19,7 +19,6 @@
*
*/
-#include "HaBroker.h"
#include "QueueReplicator.h"
#include "ReplicatingSubscription.h"
#include "qpid/broker/Bridge.h"
@@ -59,13 +58,12 @@ bool QueueReplicator::isEventKey(const s
return ret;
}
-QueueReplicator::QueueReplicator(HaBroker& hb,
+QueueReplicator::QueueReplicator(const BrokerInfo& info,
boost::shared_ptr<Queue> q,
boost::shared_ptr<Link> l)
: Exchange(replicatorName(q->getName()), 0, q->getBroker()),
- haBroker(hb),
logPrefix("Backup queue "+q->getName()+": "),
- queue(q), link(l), brokerInfo(hb.getBrokerInfo())
+ queue(q), link(l), brokerInfo(info)
{
Uuid uuid(true);
bridgeName = replicatorName(q->getName()) + std::string(".") + uuid.str();
@@ -185,7 +183,6 @@ void QueueReplicator::route(Deliverable&
}
catch (const std::exception& e) {
QPID_LOG(critical, logPrefix << "Replication failed: " << e.what());
- haBroker.shutdown();
throw;
}
}
Modified: qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.h
URL: http://svn.apache.org/viewvc/qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.h?rev=1368145&r1=1368144&r2=1368145&view=diff
==============================================================================
--- qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.h (original)
+++ qpid/branches/0.18/qpid/cpp/src/qpid/ha/QueueReplicator.h Wed Aug 1 18:03:43 2012
@@ -40,7 +40,6 @@ class Deliverable;
}
namespace ha {
-class HaBroker;
/**
* Exchange created on a backup broker to replicate a queue on the primary.
@@ -61,7 +60,7 @@ class QueueReplicator : public broker::E
/** Test if a string is an event key */
static bool isEventKey(const std::string key);
- QueueReplicator(HaBroker&,
+ QueueReplicator(const BrokerInfo&,
boost::shared_ptr<broker::Queue> q,
boost::shared_ptr<broker::Link> l);
@@ -81,7 +80,6 @@ class QueueReplicator : public broker::E
void initializeBridge(broker::Bridge& bridge, broker::SessionHandler& sessionHandler);
void dequeue(framing::SequenceNumber, sys::Mutex::ScopedLock&);
- HaBroker& haBroker;
std::string logPrefix;
std::string bridgeName;
sys::Mutex lock;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org