diff options
| author | Carl C. Trieloff <cctrieloff@apache.org> | 2009-07-07 16:00:16 +0000 |
|---|---|---|
| committer | Carl C. Trieloff <cctrieloff@apache.org> | 2009-07-07 16:00:16 +0000 |
| commit | c46b234c3984c7f0d26e4a33d4d3c47d7515f1fd (patch) | |
| tree | 2c639df55987758c33ff03005cda521fd2f247a2 /qpid/cpp | |
| parent | e85be7eaf325faa3ac31d463e41a4869c21bfae3 (diff) | |
| download | qpid-python-c46b234c3984c7f0d26e4a33d4d3c47d7515f1fd.tar.gz | |
Correcting to ensure recovered cluster-durable messages are dequeued from store
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@791886 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp index ae5faf9dc5..edddfc6db8 100644 --- a/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp +++ b/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp @@ -45,8 +45,7 @@ class RecoverableMessageImpl : public RecoverableMessage intrusive_ptr<Message> msg; const uint64_t stagingThreshold; public: - RecoverableMessageImpl(const intrusive_ptr<Message>& _msg, uint64_t _stagingThreshold) - : msg(_msg), stagingThreshold(_stagingThreshold) {} + RecoverableMessageImpl(const intrusive_ptr<Message>& _msg, uint64_t _stagingThreshold); ~RecoverableMessageImpl() {}; void setPersistenceId(uint64_t id); bool loadContent(uint64_t available); @@ -160,6 +159,13 @@ void RecoveryManagerImpl::recoveryComplete() queues.eachQueue(boost::bind(&Queue::recoveryComplete, _1)); } +RecoverableMessageImpl:: RecoverableMessageImpl(const intrusive_ptr<Message>& _msg, uint64_t _stagingThreshold) : msg(_msg), stagingThreshold(_stagingThreshold) +{ + if (!msg->isPersistent()) { + msg->forcePersistent(); // set so that message will get dequeued from store. + } +} + bool RecoverableMessageImpl::loadContent(uint64_t available) { return !stagingThreshold || available < stagingThreshold; |
