qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1177831 - /qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp
Date Fri, 30 Sep 2011 20:55:54 GMT
Author: aconway
Date: Fri Sep 30 20:55:54 2011
New Revision: 1177831

URL: http://svn.apache.org/viewvc?rev=1177831&view=rev
Log:
QPID-2920: Fix race condition causing sporadic duplicate messages.

Modified:
    qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp

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=1177831&r1=1177830&r2=1177831&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 Fri Sep 30 20:55:54
2011
@@ -303,8 +303,8 @@ bool Queue::getNextMessage(QueuedMessage
 Queue::ConsumeCode Queue::consumeNextMessage(QueuedMessage& m, Consumer::shared_ptr c)
 {
     while (true) {
-        ClusterAcquireScope acquireScope; // Outside the lock
         Activity::Scope consumeScope(consuming);
+        ClusterAcquireScope acquireScope;
         Mutex::ScopedLock locker(messageLock);
         if (!consumeScope) {
             QPID_LOG(trace, "Queue stopped, can't  consume: " << name);



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


Mime
View raw message