qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1750417 - in /qpid/trunk/qpid/cpp/src/qpid/ha: Primary.cpp Primary.h ReplicatingSubscription.cpp
Date Mon, 27 Jun 2016 21:55:53 GMT
Author: aconway
Date: Mon Jun 27 21:55:53 2016
New Revision: 1750417

URL: http://svn.apache.org/viewvc?rev=1750417&view=rev
Log:
QPID-7326: Memory bloat on HA primary broker

Removed left-over code that was keeping queues in an unused map.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/Primary.h
    qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp?rev=1750417&r1=1750416&r2=1750417&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp Mon Jun 27 21:55:53 2016
@@ -259,13 +259,6 @@ void Primary::readyReplica(const Replica
     if (backup) checkReady(backup);
 }
 
-void Primary::addReplica(ReplicatingSubscription& rs) {
-    // Note this is called before the ReplicatingSubscription has been activated
-    // on the queue.
-    sys::Mutex::ScopedLock l(lock);
-    replicas[make_pair(rs.getBrokerInfo().getSystemId(), rs.getQueue())] = &rs;
-}
-
 // NOTE: Called with queue registry lock held.
 void Primary::queueCreate(const QueuePtr& q) {
     // Set replication argument.

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/Primary.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/Primary.h?rev=1750417&r1=1750416&r2=1750417&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/Primary.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/Primary.h Mon Jun 27 21:55:53 2016
@@ -83,7 +83,6 @@ class Primary : public Role
     void setBrokerUrl(const Url&) {}
 
     void readyReplica(const ReplicatingSubscription&);
-    void addReplica(ReplicatingSubscription&);
 
     // Called via BrokerObserver
     void queueCreate(const QueuePtr&);
@@ -107,8 +106,6 @@ class Primary : public Role
     typedef std::set<RemoteBackupPtr > BackupSet;
 
     typedef std::pair<types::Uuid, boost::shared_ptr<broker::Queue> > UuidQueue;
-    typedef sys::unordered_map<UuidQueue, ReplicatingSubscription*,
-                               Hasher<UuidQueue> > ReplicaMap;
 
     RemoteBackupPtr backupConnect(const BrokerInfo&, broker::Connection&, sys::Mutex::ScopedLock&);
     void backupDisconnect(RemoteBackupPtr, sys::Mutex::ScopedLock&);
@@ -139,7 +136,6 @@ class Primary : public Role
     boost::shared_ptr<broker::BrokerObserver> brokerObserver;
     boost::shared_ptr<broker::SessionHandlerObserver> sessionHandlerObserver;
     boost::intrusive_ptr<sys::TimerTask> timerTask;
-    ReplicaMap replicas;
     PrimaryQueueLimits queueLimits;
 };
 }} // namespace qpid::ha

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp?rev=1750417&r1=1750416&r2=1750417&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.cpp Mon Jun 27 21:55:53 2016
@@ -157,8 +157,6 @@ void ReplicatingSubscription::initialize
                      << ", backup (keep " << skipEnqueue << ", drop " <<
initDequeues << ")");
             checkReady(l);
         }
-
-        if (primary) primary->addReplica(*this);
         Mutex::ScopedLock l(lock); // Note dequeued() can be called concurrently.
         // Send initial dequeues to the backup.
         // There must be a shared_ptr(this) when sending.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message