You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2011/09/30 22:55:54 UTC
svn commit: r1177831 -
/qpid/branches/qpid-2920-active/qpid/cpp/src/qpid/broker/Queue.cpp
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