diff options
author | Alan Conway <aconway@apache.org> | 2009-05-26 21:41:52 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-05-26 21:41:52 +0000 |
commit | 0c30ca90a6820dd152677c3c0966a6a20fd377bb (patch) | |
tree | d643b8ec8869d94c9baef34e64c884fff6656cab /cpp/src/qpid/cluster/Connection.cpp | |
parent | 5ce2eb3ccdfe0b90436b6095b0498d59f9057de0 (diff) | |
download | qpid-python-0c30ca90a6820dd152677c3c0966a6a20fd377bb.tar.gz |
Improved doOutput algorithm.
Simpler & more robust algorithm based on message count rather than byte size.
Self-tuning, removes 2 hard-to-explain cluster options.
Similar or marginally better performance.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@778896 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Connection.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Connection.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index cc0af77029..dda4b5435b 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -113,14 +113,6 @@ bool Connection::doOutput() { return output.doOutput(); } -// Delivery of doOutput allows us to run the real connection doOutput() -// which stocks up the write buffers with data. -// -void Connection::deliverDoOutput(uint32_t requested) { - assert(!catchUp); - output.deliverDoOutput(requested); -} - // Received from a directly connected client. void Connection::received(framing::AMQFrame& f) { QPID_LOG(trace, cluster << " RECV " << *this << ": " << f); @@ -279,7 +271,7 @@ void Connection::sessionState( QPID_LOG(debug, cluster << " received session state update for " << sessionState().getId()); } -void Connection::shadowReady(uint64_t memberId, uint64_t connectionId, const string& username, const string& fragment) { +void Connection::shadowReady(uint64_t memberId, uint64_t connectionId, const string& username, const string& fragment, uint32_t sendMax) { ConnectionId shadowId = ConnectionId(memberId, connectionId); QPID_LOG(debug, cluster << " catch-up connection " << *this << " becomes shadow " << shadowId); self = shadowId; @@ -287,6 +279,7 @@ void Connection::shadowReady(uint64_t memberId, uint64_t connectionId, const str // OK to use decoder here because cluster is stalled for update. cluster.getDecoder().get(self).setFragment(fragment.data(), fragment.size()); connection.setErrorListener(this); + output.setSendMax(sendMax); } void Connection::membership(const FieldTable& joiners, const FieldTable& members, uint64_t frameSeq) { |