qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
Subject svn commit: r1417511 - in /qpid/trunk/qpid/cpp/src/qpid/broker: RecoverableMessage.h RecoverableMessageImpl.h RecoveryManagerImpl.cpp
Date Wed, 05 Dec 2012 16:29:59 GMT
Author: kpvdr
Date: Wed Dec  5 16:29:59 2012
New Revision: 1417511

URL: http://svn.apache.org/viewvc?rev=1417511&view=rev
Log:
QPID-4490: Durable mesages with TTL do not expire after broker recovery (c++ store) - fix

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessage.h
    qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessageImpl.h
    qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessage.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessage.h?rev=1417511&r1=1417510&r2=1417511&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessage.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessage.h Wed Dec  5 16:29:59 2012
@@ -28,6 +28,7 @@
 
 namespace qpid {
 namespace broker {
+class ExpiryPolicy;
 
 /**
  * The interface through which messages are reloaded on recovery.
@@ -38,6 +39,7 @@ public:
     typedef boost::shared_ptr<RecoverableMessage> shared_ptr;
     virtual void setPersistenceId(uint64_t id) = 0;
     virtual void setRedelivered() = 0;
+    virtual void computeExpiration(const boost::intrusive_ptr<ExpiryPolicy>& e)
= 0;
     /**
      * Used by store to determine whether to load content on recovery
      * or let message load its own content as and when it requires it.

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessageImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessageImpl.h?rev=1417511&r1=1417510&r2=1417511&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessageImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/RecoverableMessageImpl.h Wed Dec  5 16:29:59 2012
@@ -37,6 +37,7 @@ public:
     ~RecoverableMessageImpl() {};
     void setPersistenceId(uint64_t id);
     void setRedelivered();
+    void computeExpiration(const boost::intrusive_ptr<ExpiryPolicy>& ep);
     bool loadContent(uint64_t available);
     void decodeContent(framing::Buffer& buffer);
     void recover(boost::shared_ptr<Queue> queue);

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp?rev=1417511&r1=1417510&r2=1417511&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp Wed Dec  5 16:29:59 2012
@@ -186,6 +186,11 @@ void RecoverableMessageImpl::setRedelive
     msg.deliver();//increment delivery count (but at present that isn't recorded durably)
 }
 
+void RecoverableMessageImpl::computeExpiration(const boost::intrusive_ptr<ExpiryPolicy>&
ep)
+{
+    msg.computeExpiration(ep);
+}
+
 void RecoverableQueueImpl::recover(RecoverableMessage::shared_ptr msg)
 {
     dynamic_pointer_cast<RecoverableMessageImpl>(msg)->recover(queue);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message