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 | fdb23707352b96986daf36db3b47538a307a2888 (patch) | |
| tree | ba4f703fb4741e769e1a5c90ba3d363502961181 /cpp/src/qpid/cluster/Cluster.cpp | |
| parent | d3ba25a6c0ad0b8bce0482694152bcaed206af7b (diff) | |
| download | qpid-python-fdb23707352b96986daf36db3b47538a307a2888.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/qpid@786294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index a472287a35..e7bec8633a 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/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 |
