diff options
| author | Alan Conway <aconway@apache.org> | 2012-06-12 21:20:49 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-06-12 21:20:49 +0000 |
| commit | b5f14fcf2042226fd4adbff03ee605f270aaae73 (patch) | |
| tree | 00019716dec320cd53fb42365ae31f3e47f473ef /cpp/src/qpid/ha/QueueReplicator.cpp | |
| parent | d247d9bb74ba0e863b30194c175431cb4ea78a90 (diff) | |
| download | qpid-python-b5f14fcf2042226fd4adbff03ee605f270aaae73.tar.gz | |
QPID-3603: HA bug fixes around ha::QueueGuard
- Remove nested calls between QueueGuard::dequeued and ReplicatingSubscription
- ReplicatingSubscription can't start ahead of QueueGuard::getReadyPosition()
- Fix QueueGuard firstSafe calcultatoin
- Replace DequeueRemover with DequeueScanner in ReplicatingSubscription
- Removed bad assertions in ReplicatingSubscription and QueueGuard
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1349544 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/ha/QueueReplicator.cpp')
| -rw-r--r-- | cpp/src/qpid/ha/QueueReplicator.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/src/qpid/ha/QueueReplicator.cpp b/cpp/src/qpid/ha/QueueReplicator.cpp index 7c65ea3522..af987a1e5e 100644 --- a/cpp/src/qpid/ha/QueueReplicator.cpp +++ b/cpp/src/qpid/ha/QueueReplicator.cpp @@ -144,11 +144,9 @@ template <class T> T decodeContent(Message& m) { void QueueReplicator::dequeue(SequenceNumber n, sys::Mutex::ScopedLock&) { // Thread safe: only calls thread safe Queue functions. - if (queue->getPosition() >= n) { // Ignore messages we haven't reached yet - QueuedMessage message; - if (queue->acquireMessageAt(n, message)) - queue->dequeue(0, message); - } + QueuedMessage message; + if (queue->acquireMessageAt(n, message)) + queue->dequeue(0, message); } // Called in connection thread of the queues bridge to primary. |
