diff options
author | Alan Conway <aconway@apache.org> | 2009-06-18 21:25:00 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-06-18 21:25:00 +0000 |
commit | 1ab0573accff3416b1a22ac69eacb57c63bb69f0 (patch) | |
tree | 5c6146f277426c6e42a1e1d19528cf16da5cab0a /qpid/cpp/src/qpid/cluster/Cluster.cpp | |
parent | 0ac0ba5e1d146a133abbd1ea0ddcabe6d25ab987 (diff) | |
download | qpid-python-1ab0573accff3416b1a22ac69eacb57c63bb69f0.tar.gz |
Make error-check a cluster-connection control rather than a cluster control.
Fixes bug if an error occurs during update. As cluster controls, error-checks
were being processed out of sequence with the connection data they referred to.
Making them connection controls ensures they are processed in the proper order.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@786294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/cluster/Cluster.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/cluster/Cluster.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.cpp b/qpid/cpp/src/qpid/cluster/Cluster.cpp index a472287a35..e7bec8633a 100644 --- a/qpid/cpp/src/qpid/cluster/Cluster.cpp +++ b/qpid/cpp/src/qpid/cluster/Cluster.cpp @@ -105,7 +105,6 @@ #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" -#include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/ClusterUpdateOfferBody.h" @@ -134,7 +133,7 @@ using namespace qpid::framing; using namespace qpid::sys; using namespace std; using namespace qpid::cluster; -using namespace qpid::framing::cluster; +using namespace qpid::framing::cluster_connection; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; @@ -152,7 +151,7 @@ struct ClusterDispatcher : public framing::AMQP_AllOperations::ClusterHandler { void configChange(const std::string& current) { cluster.configChange(member, current, l); } void updateOffer(uint64_t updatee, const Uuid& id) { cluster.updateOffer(member, updatee, id, l); } void messageExpired(uint64_t id) { cluster.messageExpired(member, id, l); } - void errorCheck(uint8_t type, uint64_t seq) { cluster.errorCheck(member, type, seq, l); } + void shutdown() { cluster.shutdown(member, l); } bool invoke(AMQBody& body) { return framing::invoke(*this, body).wasHandled(); } @@ -765,16 +764,4 @@ void Cluster::messageExpired(const MemberId&, uint64_t id, Lock&) { expiryPolicy->deliverExpire(id); } -void Cluster::errorCheck(const MemberId& m, uint8_t type, uint64_t frameSeq, Lock&) { - // If we receive an errorCheck here, it's because we have processed past the point - // of the error so respond with ERROR_TYPE_NONE - assert(map.getFrameSeq() >= frameSeq); - if (type != framing::cluster::ERROR_TYPE_NONE) { // Don't respond to NONE. - QPID_LOG(debug, "Error " << frameSeq << " on " << m << " did not occur locally"); - mcast.mcastControl( - ClusterErrorCheckBody(ProtocolVersion(), - framing::cluster::ERROR_TYPE_NONE, frameSeq), self); - } -} - }} // namespace qpid::cluster |