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 | c3d51bdd7d5bd3f6faaa05dfce641cbfe9855b47 (patch) | |
tree | c5bfb5b5b4b405be63b92258e22e5dce20faaba4 /cpp/src | |
parent | f182259b5f1cb91aaf7fb5b6d4323758551f4291 (diff) | |
download | qpid-python-c3d51bdd7d5bd3f6faaa05dfce641cbfe9855b47.tar.gz |
QPID-3174: remove unnecessary enqueueComplete() calls
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1087868 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index 7a266fb4e3..8efa8be3dc 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/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; |