diff options
| author | Alan Conway <aconway@apache.org> | 2009-01-09 14:47:21 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-01-09 14:47:21 +0000 |
| commit | bd5ae249ef74e1707eb05dd6cc70bb816e318757 (patch) | |
| tree | 8bddf4750138996b45b1c099b2619a9a836f2015 /cpp/src/qpid/cluster/Cluster.cpp | |
| parent | 29efbadc913a3386ba5877512e0a8887504d4a42 (diff) | |
| download | qpid-python-bd5ae249ef74e1707eb05dd6cc70bb816e318757.tar.gz | |
Fix --cluster-mast-max: errors in last commit.
Work around problems with CPG flow control.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@733051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index 52f5e4872d..ad1f4b704d 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -187,14 +187,15 @@ void Cluster::deliver( Mutex::ScopedLock l(lock); MemberId from(nodeid, pid); framing::Buffer buf(static_cast<char*>(msg), msg_len); - deliver(Event::decode(from, buf), l); + Event e(Event::decode(from, buf)); + if (from == myId) // Record self-deliveries for flow control. + mcast.selfDeliver(e); + deliver(e, l); } void Cluster::deliver(const Event& e, Lock&) { if (state == LEFT) return; QPID_LOG(trace, *this << " PUSH: " << e); - if (e.getMemberId() == myId) - mcast.delivered(e); // Note delivery for flow control deliverQueue.push(e); } @@ -215,7 +216,7 @@ void Cluster::deliveredEvent(const Event& e) { if (e.isCluster()) { while (frame.decode(buf)) { QPID_LOG(trace, *this << " DLVR: " << e << " " << frame); - Mutex::ScopedLock l(lock); // FIXME aconway 2008-12-11: lock scope is too big. + Mutex::ScopedLock l(lock); // FIXME aconway 2008-12-11: lock scope too big? ClusterDispatcher dispatch(*this, e.getMemberId(), l); if (!framing::invoke(dispatch, *frame.getBody()).wasHandled()) throw Exception(QPID_MSG("Invalid cluster control")); @@ -406,8 +407,6 @@ void Cluster::dumpOffer(const MemberId& dumper, uint64_t dumpeeInt, const Uuid& } } -// FIXME aconway 2008-10-15: no longer need a separate control now -// that the dump control is in the deliver queue. void Cluster::dumpStart(const MemberId& dumpee, const Url& url, Lock&) { if (state == LEFT) return; assert(state == OFFER); |
