summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/ha/Primary.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-01-11 20:34:19 +0000
committerAlan Conway <aconway@apache.org>2013-01-11 20:34:19 +0000
commit9ad9300d032b5e0aba5af4f7affd81600c9f8a5d (patch)
treed6e42e51dab4048c09f1805ac9793a7eb03c4fc9 /qpid/cpp/src/qpid/ha/Primary.cpp
parent6a38c54635931afef32f80a3943a923d5f41cd95 (diff)
downloadqpid-python-9ad9300d032b5e0aba5af4f7affd81600c9f8a5d.tar.gz
QPID-4516: Sporadic failure in ha_tests test_failover_send_receive
Several fixes were required in the code to correct this problem: - Missing break statement in switch. - Remove unused function HaBroker::resetMembership - Abort connection of timed-out backups so they can attempt to reconnect. - New primary resets membership before allowing backups to connect. - Test for and ignore double-promotion. - HaBroker: dynamic logPrefix() shows status. Made status atomic for efficient access for log messages. - Update primary status in membership. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1432273 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/ha/Primary.cpp')
-rw-r--r--qpid/cpp/src/qpid/ha/Primary.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/ha/Primary.cpp b/qpid/cpp/src/qpid/ha/Primary.cpp
index 40ae9ff07b..259b043bef 100644
--- a/qpid/cpp/src/qpid/ha/Primary.cpp
+++ b/qpid/cpp/src/qpid/ha/Primary.cpp
@@ -161,6 +161,10 @@ void Primary::timeoutExpectedBackups() {
expectedBackups.erase(i++);
backups.erase(info.getSystemId());
rb->cancel();
+ // Downgrade the broker's status to CATCHUP
+ // The broker will get this status change when it eventually connects.
+ info.setStatus(CATCHUP);
+ haBroker.addBroker(info);
}
else ++i;
}