summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-10-24 14:33:09 +0000
committerAlan Conway <aconway@apache.org>2012-10-24 14:33:09 +0000
commita8ff2bf3a270245937feff06731c2c95c853bdd5 (patch)
treee8f9e2bd22b2879fa212d09e668c431281758165 /qpid/cpp
parentb62362da43bbc8d57b6c15955e5f74862569259b (diff)
downloadqpid-python-a8ff2bf3a270245937feff06731c2c95c853bdd5.tar.gz
Bug 868364 - QPID-4391: HA replicating subscriptions should not auto-delete queues
When an auto-delete queue is replicated, the replicating subscription attempts to auto-delete the queue after it has already been auto-deleted by the closing of the last non-HA consumer. An issue occurs if a new auto-delete queue with the same name is created shortly after the deletion of the previously queue. This can occur when a client subscribes to an auto-delete queue and is temporarily disconnected from the broker. It is possible for the cancelled HA subscription to remove the newly created queue from the queue registry since the old and new queues use the same names. The HA replicating subscription should not execute the auto-delete logic when the subscription is cancelled. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1401709 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp
index 767305af81..6e42f8d746 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.cpp
+++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp
@@ -432,9 +432,9 @@ void SemanticState::cancel(ConsumerImpl::shared_ptr c)
Queue::shared_ptr queue = c->getQueue();
if(queue) {
queue->cancel(c);
- if (queue->canAutoDelete() && !queue->hasExclusiveOwner()) {
+ // Only run auto-delete for counted consumers.
+ if (c->isCounted() && queue->canAutoDelete() && !queue->hasExclusiveOwner())
Queue::tryAutoDelete(session.getBroker(), queue, connectionId, userID);
- }
}
c->cancel();
}