summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-05-15 15:03:44 +0000
committerAlan Conway <aconway@apache.org>2013-05-15 15:03:44 +0000
commitdf861e2e13c9fbc92a6ac3751e80037f632651b6 (patch)
treea8417e29086c1cdb96318c8144038ecf295a5e1e /qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
parentfd41668d683923894787ddc639a2829de2b7b414 (diff)
downloadqpid-python-df861e2e13c9fbc92a6ac3751e80037f632651b6.tar.gz
QPID-4745: HA safe port allocation for brokers in HA tests.
Many HA tests use --port=0 to start a broker on an available port, but then need to shutdown and restart the broker on the same port. This is not safe, on a busy system it is possible for another process to take the port between the time the broker is shut down and the time it is restarted. The solution is to do bind(0) and listen in the python test framework (class HaPort) and let the broker use the socket using qpidd --socket-fd. When the broker is shut down the port remains bound by the python process. When the broker is re-started it again is given access to the socket via --socket-fd. Other changes - move ha_store_tests into ha_tests. - add heartbeats to avoid stalling. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1482881 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/ha/BrokerReplicator.cpp')
-rw-r--r--qpid/cpp/src/qpid/ha/BrokerReplicator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
index f461a2f0e0..fa8f330f27 100644
--- a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
+++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
@@ -878,7 +878,7 @@ namespace {
// Called by ConnectionObserver::disconnected, disconnected from the network side.
void BrokerReplicator::disconnected() {
- QPID_LOG(info, logPrefix << "Disconnected from " << primary);
+ QPID_LOG(info, logPrefix << "Disconnected from primary " << primary);
connection = 0;
// Clean up auto-delete queues
vector<boost::shared_ptr<Exchange> > collect;