diff options
author | Alan Conway <aconway@apache.org> | 2008-09-26 21:49:52 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-09-26 21:49:52 +0000 |
commit | 9809badd6486af7697767b80f123885eb1892e4a (patch) | |
tree | 07de43c0e2dd873743b44159e6fd4b8a1b6008db /qpid/cpp/src/qpid/cluster/JoiningHandler.cpp | |
parent | 4ae784ffe9c552cf4f113b340c502860cfa3c391 (diff) | |
download | qpid-python-9809badd6486af7697767b80f123885eb1892e4a.tar.gz |
Clean up end-of-dump protocol for new cluster members.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@699513 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/cluster/JoiningHandler.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/cluster/JoiningHandler.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/qpid/cpp/src/qpid/cluster/JoiningHandler.cpp b/qpid/cpp/src/qpid/cluster/JoiningHandler.cpp index 58c444ac62..6838313263 100644 --- a/qpid/cpp/src/qpid/cluster/JoiningHandler.cpp +++ b/qpid/cpp/src/qpid/cluster/JoiningHandler.cpp @@ -105,27 +105,8 @@ void JoiningHandler::ready(const MemberId& id, const std::string& urlStr) { checkDumpRequest(); } -void JoiningHandler::insert(const boost::intrusive_ptr<Connection>& c) { - Mutex::ScopedLock l(cluster.lock); - if (c->isCatchUp()) { - ++catchUpConnections; - QPID_LOG(debug, "Catch-up connection " << *c << " started, total " << catchUpConnections); - } - cluster.connections.insert(Cluster::ConnectionMap::value_type(c->getId(), c)); -} - -void JoiningHandler::catchUpClosed(const boost::intrusive_ptr<Connection>& c) { - Mutex::ScopedLock l(cluster.lock); - QPID_LOG(debug, "Catch-up complete for " << *c << ", remaining catch-ups: " << catchUpConnections-1); - if (c->isShadow()) - cluster.connections.insert(Cluster::ConnectionMap::value_type(c->getId(), c)); - if (--catchUpConnections == 0) - dumpComplete(); -} - void JoiningHandler::dumpComplete() { - // FIXME aconway 2008-09-18: need to detect incomplete dump. - // Called with lock - volatile? + Mutex::ScopedLock l(cluster.lock); if (state == STALLED) { QPID_LOG(debug, cluster.self << " received dump and stalled at start point, unstalling."); cluster.ready(); @@ -135,6 +116,7 @@ void JoiningHandler::dumpComplete() { assert(state == DUMP_REQUESTED); state = DUMP_COMPLETE; } + // FIXME aconway 2008-09-18: need to detect incomplete dump. } |