qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1173696 - in /qpid/branches/qpid-2920-active/qpid/cpp/src/qpid: broker/Cluster.h broker/NullCluster.h broker/Queue.cpp cluster/exp/BrokerContext.cpp cluster/exp/BrokerContext.h cluster/exp/MessageHandler.cpp
Date Wed, 21 Sep 2011 14:56:03 GMT
Author: aconway
Date: Wed Sep 21 14:56:03 2011
New Revision: 1173696

URL: http://svn.apache.org/viewvc?rev=1173696&view=rev
Log:
QPID-2920: Remove deferred dequeue, not needed.

Modified:
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Cluster.h
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/NullCluster.h
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/MessageHandler.cpp

Modified: qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Cluster.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Cluster.h?rev=1173696&r1=1173695&r2=1173696&view=diff
==============================================================================
--- qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Cluster.h (original)
+++ qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Cluster.h Wed Sep 21 14:56:03
2011
@@ -74,7 +74,7 @@ class Cluster
      *@return true if the message should be dequeued now, false if it
      * will be dequeued later.
      */
-    virtual bool dequeue(const QueuedMessage&) = 0;
+    virtual void dequeue(const QueuedMessage&) = 0;
 
     // Consumers
 

Modified: qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/NullCluster.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/NullCluster.h?rev=1173696&r1=1173695&r2=1173696&view=diff
==============================================================================
--- qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/NullCluster.h (original)
+++ qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/NullCluster.h Wed Sep 21 14:56:03
2011
@@ -42,7 +42,7 @@ class NullCluster : public Cluster
     virtual void routed(const boost::intrusive_ptr<Message>&) {}
     virtual void acquire(const QueuedMessage&) {}
     virtual void requeue(const QueuedMessage&) {}
-    virtual bool dequeue(const QueuedMessage&) { return false; }
+    virtual void dequeue(const QueuedMessage&) {}
 
     // Consumers
 

Modified: qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp?rev=1173696&r1=1173695&r2=1173696&view=diff
==============================================================================
--- qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp Wed Sep 21 14:56:03
2011
@@ -702,8 +702,7 @@ void Queue::enqueueAborted(boost::intrus
 bool Queue::dequeue(TransactionContext* ctxt, const QueuedMessage& msg)
 {
     // FIXME aconway 2011-09-13: new cluster needs tx/dtx support.
-    if (!ctxt && broker)
-        if (!broker->getCluster().dequeue(msg)) return false;
+    if (!ctxt && broker) broker->getCluster().dequeue(msg);
 
     ScopedUse u(barrier);
     if (!u.acquired) return false;

Modified: qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp?rev=1173696&r1=1173695&r2=1173696&view=diff
==============================================================================
--- qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp (original)
+++ qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.cpp Wed Sep
21 14:56:03 2011
@@ -110,14 +110,13 @@ void BrokerContext::acquire(const broker
                    ProtocolVersion(), qm.queue->getName(), qm.position));
 }
 
-bool BrokerContext::dequeue(const broker::QueuedMessage& qm) {
+void BrokerContext::dequeue(const broker::QueuedMessage& qm) {
     // FIXME aconway 2011-09-15: should dequeue locally immediately
     // instead of waiting for redeliver. No need for CPG order on
     // dequeues.
     if (!tssNoReplicate)
         core.mcast(ClusterMessageDequeueBody(
                        ProtocolVersion(), qm.queue->getName(), qm.position));
-    return false;               // FIXME aconway 2011-09-14: needed?
 }
 
 void BrokerContext::requeue(const broker::QueuedMessage& qm) {

Modified: qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h?rev=1173696&r1=1173695&r2=1173696&view=diff
==============================================================================
--- qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h (original)
+++ qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/BrokerContext.h Wed Sep 21
14:56:03 2011
@@ -57,7 +57,7 @@ class BrokerContext : public broker::Clu
     bool enqueue(broker::Queue&, const boost::intrusive_ptr<broker::Message>&);
     void routed(const boost::intrusive_ptr<broker::Message>&);
     void acquire(const broker::QueuedMessage&);
-    bool dequeue(const broker::QueuedMessage&);
+    void dequeue(const broker::QueuedMessage&);
     void requeue(const broker::QueuedMessage&);
 
     // Consumers

Modified: qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/MessageHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/MessageHandler.cpp?rev=1173696&r1=1173695&r2=1173696&view=diff
==============================================================================
--- qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/MessageHandler.cpp (original)
+++ qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/cluster/exp/MessageHandler.cpp Wed Sep
21 14:56:03 2011
@@ -119,8 +119,6 @@ void MessageHandler::dequeue(const std::
     // BrokerContext::dequeue
 
     if (sender() != self()) {
-        // FIXME aconway 2011-09-15: new cluster, inefficient looks up
-        // message by position multiple times?
         boost::shared_ptr<Queue> queue = findQueue(q, "Cluster dequeue failed");
         // Remove fom the unacked list
         QueueContext::get(*queue)->dequeue(position);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message