diff options
author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2011-04-01 19:36:26 +0000 |
---|---|---|
committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2011-04-01 19:36:26 +0000 |
commit | 8b1b756f5ce076237564d42ba33a76e63a1c1d22 (patch) | |
tree | 9371639a67b52f57795321447c2c2c40d05ea263 | |
parent | e7f203ecdd05e1fe0aa2cae7c629b57cbe898da8 (diff) | |
download | qpid-python-8b1b756f5ce076237564d42ba33a76e63a1c1d22.tar.gz |
QPID-3174: remove unnecessary enqueueComplete() calls
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1087868 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index 7a266fb4e3..8efa8be3dc 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -183,7 +183,6 @@ void Queue::recover(boost::intrusive_ptr<Message>& msg){ // setup synclist for recovered messages, so they don't get re-stored on lastNodeFailure msg->addToSyncList(shared_from_this(), store); } - msg->enqueueComplete(); // mark the message as enqueued if (store && (!msg->isContentLoaded() || msg->checkContentReleasable())) { //content has not been loaded, need to ensure that lazy loading mode is set: @@ -210,7 +209,6 @@ void Queue::requeue(const QueuedMessage& msg){ { Mutex::ScopedLock locker(messageLock); if (!isEnqueued(msg)) return; - msg.payload->enqueueComplete(); // mark the message as enqueued messages->reinsert(msg); listeners.populate(copy); @@ -632,7 +630,9 @@ bool Queue::enqueue(TransactionContext* ctxt, boost::intrusive_ptr<Message>& msg } if ((msg->isPersistent() || msg->checkContentReleasable()) && store) { - msg->enqueueAsync(shared_from_this(), store); //increment to async counter -- for message sent to more than one queue + // mark the message as being enqueued - the store MUST CALL msg->enqueueComplete() + // when it considers the message stored. + msg->enqueueAsync(shared_from_this(), store); boost::intrusive_ptr<PersistableMessage> pmsg = boost::static_pointer_cast<PersistableMessage>(msg); store->enqueue(ctxt, pmsg, *this); return true; |