Author: aconway
Date: Mon Jan 18 16:28:17 2010
New Revision: 900448

URL: http://svn.apache.org/viewvc?rev=900448&view=rev
Log:
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.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/PersistableMessage.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h
    qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/PersistableMessage.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/PersistableMessage.cpp?rev=900448&r1=900447&r2=900448&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/PersistableMessage.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/PersistableMessage.cpp Mon Jan 18 
16:28:17 2010
@@ -83,16 +83,8 @@
             }
         }
     }
-    if (notify) {
+    if (notify) 
         allEnqueuesComplete();
-        sys::ScopedLock<sys::Mutex> 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){

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h?rev=900448&r1=900447&r2=900448&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/PersistableQueue.h Mon Jan 18 16:28:17 
2010
@@ -66,17 +66,7 @@
     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;
     
 };

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=900448&r1=900447&r2=900448&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Mon Jan 18 16:28:17 2010
@@ -124,16 +124,6 @@
         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<Message>& msg)
 {
     return token && token->isLocal(msg->getPublisher());

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h?rev=900448&r1=900447&r2=900448&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Queue.h Mon Jan 18 16:28:17 2010
@@ -153,7 +153,6 @@
 
         public:
 
-            virtual void notifyDurableIOComplete();
             typedef boost::shared_ptr<Queue> shared_ptr;
 
             typedef std::vector<shared_ptr> vector;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to