qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1483107 - in /qpid/trunk/qpid/cpp/src: qpid/ha/QueueReplicator.cpp qpid/ha/ReplicatingSubscription.h tests/ha_tests.py
Date Wed, 15 May 2013 21:53:56 GMT
Author: aconway
Date: Wed May 15 21:53:55 2013
New Revision: 1483107

URL: http://svn.apache.org/r1483107
Log:
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.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.h
    qpid/trunk/qpid/cpp/src/tests/ha_tests.py

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp?rev=1483107&r1=1483106&r2=1483107&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp Wed May 15 21:53:55 2013
@@ -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);

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.h?rev=1483107&r1=1483106&r2=1483107&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/ReplicatingSubscription.h Wed May 15 21:53:55 2013
@@ -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
 {

Modified: qpid/trunk/qpid/cpp/src/tests/ha_tests.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ha_tests.py?rev=1483107&r1=1483106&r2=1483107&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ha_tests.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/ha_tests.py Wed May 15 21:53:55 2013
@@ -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()



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


Mime
View raw message