qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1636848 - /qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp
Date Wed, 05 Nov 2014 10:33:59 GMT
Author: gsim
Date: Wed Nov  5 10:33:59 2014
New Revision: 1636848

URL: http://svn.apache.org/r1636848
Log:
QPID-6213: only restart timer once all queues have been purged

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp?rev=1636848&r1=1636847&r2=1636848&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp Wed Nov  5 10:33:59 2014
@@ -74,6 +74,7 @@ void QueueCleaner::setTimer(qpid::sys::T
 void QueueCleaner::fired()
 {
     queues.eachQueue(boost::bind(&PurgeSet::push, &purging, _1));
+    QPID_LOG(debug, "Requested purge of queues");
 }
 
 QueueCleaner::QueuePtrs::const_iterator QueueCleaner::purge(const QueueCleaner::QueuePtrs&
batch)
@@ -81,8 +82,12 @@ QueueCleaner::QueuePtrs::const_iterator 
     for (QueuePtrs::const_iterator i = batch.begin(); i != batch.end(); ++i) {
         (*i)->purgeExpired(period);
     }
-    task->restart();
-    timer->add(task);
+    QPID_LOG(debug, "Purged " << batch.size() << " queues");
+    if (purging.empty()) {
+        task->restart();
+        timer->add(task);
+        QPID_LOG(debug, "Restarted purge timer");
+    }
     return batch.end();
 }
 



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


Mime
View raw message