summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-01-19 23:07:54 +0000
committerAlan Conway <aconway@apache.org>2012-01-19 23:07:54 +0000
commitc22541a432b9734e015f78f46543ca97a9cab043 (patch)
treeaf526014e5524b9e2dbd569f0f7a79e9a5aae69e
parentcd899c3162517aac1ebaf2f07d04020b6df4eda7 (diff)
downloadqpid-python-c22541a432b9734e015f78f46543ca97a9cab043.tar.gz
QPID-3603: Fix memory management error in QueueReplicator.cpp
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603-2@1233677 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/ha/QueueReplicator.cpp6
-rw-r--r--qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp9
-rwxr-xr-xqpid/cpp/src/tests/qpid-cpp-benchmark1
3 files changed, 6 insertions, 10 deletions
diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
index 6eed8010be..0929cc718d 100644
--- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
+++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
@@ -118,8 +118,6 @@ void QueueReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHa
peer.getMessage().flow(getName(), 0, 0xFFFFFFFF);
peer.getMessage().flow(getName(), 1, 0xFFFFFFFF);
QPID_LOG(debug, logPrefix << "Activated bridge from " << args.i_src << " to " << args.i_dest);
- // Reset self reference so this will be deleted when all external refs are gone.
- self.reset();
}
namespace {
@@ -150,13 +148,13 @@ void QueueReplicator::route(Deliverable& msg, const std::string& key, const Fiel
sys::Mutex::ScopedLock l(lock);
if (key == DEQUEUE_EVENT_KEY) {
SequenceSet dequeues = decodeContent<SequenceSet>(msg.getMessage());
- QPID_LOG(trace, logPrefix << "Received dequeues: " << dequeues);
+ QPID_LOG(trace, logPrefix << "Dequeue update: " << dequeues);
//TODO: should be able to optimise the following
for (SequenceSet::iterator i = dequeues.begin(); i != dequeues.end(); i++)
dequeue(*i, l);
} else if (key == POSITION_EVENT_KEY) {
SequenceNumber position = decodeContent<SequenceNumber>(msg.getMessage());
- QPID_LOG(trace, logPrefix << "Advance position: from " << queue->getPosition()
+ QPID_LOG(trace, logPrefix << "Position update: from " << queue->getPosition()
<< " to " << position);
assert(queue->getPosition() <= position);
//TODO aconway 2011-12-14: Optimize this?
diff --git a/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp b/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp
index 3dae5fd0a7..733492db81 100644
--- a/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp
+++ b/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp
@@ -89,9 +89,8 @@ ReplicatingSubscription::ReplicatingSubscription(
consumer(new DelegatingConsumer(*this))
{
stringstream ss;
- string url = parent->getSession().getConnection().getUrl();
- string qname = getQueue()->getName();
- ss << "HA: Primary queue " << qname << ", backup " << url << ": ";
+ ss << "HA: Primary: " << getQueue()->getName() << " at "
+ << parent->getSession().getConnection().getUrl() << ": ";
logPrefix = ss.str();
// FIXME aconway 2011-12-09: Failover optimization removed.
@@ -101,7 +100,7 @@ ReplicatingSubscription::ReplicatingSubscription(
// can be re-introduced later. Last revision with the optimization:
// r1213258 | QPID-3603: Fix QueueReplicator subscription parameters.
- QPID_LOG(debug, logPrefix << "Created subscription " << name);
+ QPID_LOG(debug, logPrefix << "Created backup subscription " << getName());
// FIXME aconway 2011-12-15: ConsumerImpl::position is left at 0
// so we will start consuming from the lowest numbered message.
@@ -137,7 +136,7 @@ ReplicatingSubscription::~ReplicatingSubscription() {}
// Called in the subscription's connection thread.
void ReplicatingSubscription::cancel()
{
- QPID_LOG(debug, logPrefix <<"Cancelled");
+ QPID_LOG(debug, logPrefix <<"Cancelled backup subscription " << getName());
getQueue()->removeObserver(boost::dynamic_pointer_cast<QueueObserver>(shared_from_this()));
}
diff --git a/qpid/cpp/src/tests/qpid-cpp-benchmark b/qpid/cpp/src/tests/qpid-cpp-benchmark
index 41cfc12ded..b59cb1739d 100755
--- a/qpid/cpp/src/tests/qpid-cpp-benchmark
+++ b/qpid/cpp/src/tests/qpid-cpp-benchmark
@@ -147,7 +147,6 @@ def start_send(queue, opts, broker, host):
"--report-total",
"--report-header=no",
"--timestamp=%s"%(opts.timestamp and "yes" or "no"),
- "--sequence=no",
"--flow-control", str(opts.flow_control),
"--durable", str(opts.durable)
]