summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-05-15 21:53:55 +0000
committerAlan Conway <aconway@apache.org>2013-05-15 21:53:55 +0000
commitf03145f800b4e13ca5bc168855e0dbb62994c73a (patch)
tree522a042d6cb8bb969e5892819a4a5528ce322cec /cpp/src
parentb78880a6072d1f9f729e0bacf2d71f399554a8d8 (diff)
downloadqpid-python-f03145f800b4e13ca5bc168855e0dbb62994c73a.tar.gz
QPID-4850: HA Sporadic stall in ha_tests.test_failover_send_receive
Fixed a deadlock in the test: test was killing a backup broker then waiting to pass a checkpoint: however if the backup was expected by the primary, the primary holds queues till it connects, so we deadlock. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1483107 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/ha/QueueReplicator.cpp1
-rw-r--r--cpp/src/qpid/ha/ReplicatingSubscription.h4
-rwxr-xr-xcpp/src/tests/ha_tests.py8
3 files changed, 4 insertions, 9 deletions
diff --git a/cpp/src/qpid/ha/QueueReplicator.cpp b/cpp/src/qpid/ha/QueueReplicator.cpp
index 3580c49826..946831319c 100644
--- a/cpp/src/qpid/ha/QueueReplicator.cpp
+++ b/cpp/src/qpid/ha/QueueReplicator.cpp
@@ -162,6 +162,7 @@ QueueReplicator::~QueueReplicator() {}
// Called from Queue::destroyed()
void QueueReplicator::destroy() {
+ QPID_LOG(debug, logPrefix << " destroyed");
boost::shared_ptr<Bridge> bridge2; // To call outside of lock
{
Mutex::ScopedLock l(lock);
diff --git a/cpp/src/qpid/ha/ReplicatingSubscription.h b/cpp/src/qpid/ha/ReplicatingSubscription.h
index 7fcb4ccf13..2780f4fd00 100644
--- a/cpp/src/qpid/ha/ReplicatingSubscription.h
+++ b/cpp/src/qpid/ha/ReplicatingSubscription.h
@@ -61,8 +61,8 @@ class QueueGuard;
*
* Lifecycle: broker::Queue holds shared_ptrs to this as a consumer.
*
- * Lock Hierarchy: ReplicatingSubscription MUS NOT call QueueGuard with it's lock held
- * QueueGuard MAY call ReplicatingSubscription with it's lock held.
+ * Lock Hierarchy: ReplicatingSubscription MUST NOT call QueueGuard with its
+ * lock held QueueGuard MAY call ReplicatingSubscription with its lock held.
*/
class ReplicatingSubscription : public broker::SemanticState::ConsumerImpl
{
diff --git a/cpp/src/tests/ha_tests.py b/cpp/src/tests/ha_tests.py
index 3f870ba5b8..8b4ff80dd0 100755
--- a/cpp/src/tests/ha_tests.py
+++ b/cpp/src/tests/ha_tests.py
@@ -972,19 +972,13 @@ class LongTests(HaBrokerTest):
brokers.bounce(victim) # Next one is promoted
primary = next
else:
- brokers.kill(victim, promote_next=False, final=False)
- dead = victim
+ brokers.bounce(victim, promote_next=False)
# Make sure we are not stalled
map(wait_passed, receivers, checkpoint)
# Run another checkpoint to ensure things work in this configuration
checkpoint = [ r.received+100 for r in receivers ]
map(wait_passed, receivers, checkpoint)
-
- if dead is not None:
- brokers.restart(dead) # Restart backup
- brokers[dead].ready()
- dead = None
i += 1
except:
traceback.print_exc()