From bfda4db8b99bbc057efccfe20cfcc8e270ba7592 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 18 Jan 2010 16:28:17 +0000 Subject: QPID-2295: Clustered + persistent broker crashes with inconsistency error. Code running in the store's timer thread was causing inconsistent changes in message allocation. This code is out-of-date, we no longer need to notify the Queue when persistent storage completes as the message is already available on the queue. Removed the out-dated code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@900448 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/PersistableMessage.cpp | 10 +--------- qpid/cpp/src/qpid/broker/PersistableQueue.h | 10 ---------- qpid/cpp/src/qpid/broker/Queue.cpp | 10 ---------- qpid/cpp/src/qpid/broker/Queue.h | 1 - 4 files changed, 1 insertion(+), 30 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/PersistableMessage.cpp b/qpid/cpp/src/qpid/broker/PersistableMessage.cpp index 303a0501f4..76e9404b5d 100644 --- a/qpid/cpp/src/qpid/broker/PersistableMessage.cpp +++ b/qpid/cpp/src/qpid/broker/PersistableMessage.cpp @@ -83,16 +83,8 @@ void PersistableMessage::enqueueComplete() { } } } - if (notify) { + if (notify) allEnqueuesComplete(); - sys::ScopedLock l(storeLock); - if (store) { - for (syncList::iterator i = synclist.begin(); i != synclist.end(); ++i) { - PersistableQueue::shared_ptr q(i->lock()); - if (q) q->notifyDurableIOComplete(); - } - } - } } bool PersistableMessage::isStoredOnQueue(PersistableQueue::shared_ptr queue){ diff --git a/qpid/cpp/src/qpid/broker/PersistableQueue.h b/qpid/cpp/src/qpid/broker/PersistableQueue.h index 8d85d36fef..e742a72f42 100644 --- a/qpid/cpp/src/qpid/broker/PersistableQueue.h +++ b/qpid/cpp/src/qpid/broker/PersistableQueue.h @@ -66,17 +66,7 @@ public: PersistableQueue():externalQueueStore(NULL){ }; - - /** - * call back to signal async AIO writes have - * completed (enqueue/dequeue etc) - * - * Note: DO NOT do work on this callback, if you block - * this callback you will block the store. - */ - virtual void notifyDurableIOComplete() = 0; protected: - ExternalQueueStore* externalQueueStore; }; diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index b99b849bcc..dcc5116afa 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -124,16 +124,6 @@ Queue::~Queue() mgmtObject->resourceDestroy (); } -void Queue::notifyDurableIOComplete() -{ - QueueListeners::NotificationSet copy; - { - Mutex::ScopedLock locker(messageLock); - listeners.populate(copy); - } - copy.notify(); -} - bool isLocalTo(const OwnershipToken* token, boost::intrusive_ptr& msg) { return token && token->isLocal(msg->getPublisher()); diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h index 0984d5e2cd..cac8956bf5 100644 --- a/qpid/cpp/src/qpid/broker/Queue.h +++ b/qpid/cpp/src/qpid/broker/Queue.h @@ -153,7 +153,6 @@ namespace qpid { public: - virtual void notifyDurableIOComplete(); typedef boost::shared_ptr shared_ptr; typedef std::vector vector; -- cgit v1.2.1