From 4cdf746f5bb38db60821047c3393f89f15b26f1e Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 15 Jun 2011 20:15:51 +0000 Subject: QPID-3280: Performance problem with TTL messages. When sending a large number of messages with nonzero TTLs to a cluster, overall message throughput drops by around 20-30% compared to messages with TTL 0. The previous approach to TTL in the cluster is replaced with a simpler "cluster clock". Also QueueCleaner is executed in the cluster timer, and modified to be deterministic in a cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1136170 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/cluster/Connection.cpp') diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index ab42122813..030d6e34c1 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -601,10 +601,6 @@ void Connection::queueObserverState(const std::string& qname, const std::string& QPID_LOG(error, "Failed to find observer " << observerId << " state on queue " << qname << "; this will result in inconsistencies."); } -void Connection::expiryId(uint64_t id) { - cluster.getExpiryPolicy().setId(id); -} - std::ostream& operator<<(std::ostream& o, const Connection& c) { const char* type="unknown"; if (c.isLocal()) type = "local"; @@ -724,5 +720,16 @@ void Connection::doCatchupIoCallbacks() { if (catchUp) getBrokerConnection()->doIoCallbacks(); } + +void Connection::clock(uint64_t time) { + QPID_LOG(debug, "Cluster connection received time update"); + cluster.clock(time); +} + +void Connection::queueDequeueSincePurgeState(const std::string& qname, uint32_t dequeueSincePurge) { + boost::shared_ptr queue(findQueue(qname)); + queue->setDequeueSincePurge(dequeueSincePurge); +} + }} // Namespace qpid::cluster -- cgit v1.2.1