qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorenz Quack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6840) [Java Broker] Interleave calls to processPending with attempts to write outstanding data
Date Fri, 13 Nov 2015 15:48:11 GMT

    [ https://issues.apache.org/jira/browse/QPID-6840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004145#comment-15004145

Lorenz Quack commented on QPID-6840:

Review comments (mostly small stuff):
* {{WebSocketProvider}} does not interleave. Do WebSockets not suffer from the same issue
as NonBlockingConnections?
* In {{NonBlockingConnection}}
** Typo in the the variable name {{_pendingItertor}} 
** Giving the expression {{(size - getBufferedSize())}} a name (e.g., {{bytesWritten}}) would
increase readability.
** Before we {{doRead()}} we used to call {{setTransportBlockedForWriting(!doWrite())}}. Now
you unconditionally call {{setTransportBlockedForWriting(false)}} even though it is likely
that we do have stuff to write in our buffers.
** Can {{wantsRead()}} and {{wantsWrite()}} be package protected?
** And here comes the comment you do not want to hear: {{doWork()}} has grown far longer and
more deeply nested than what is healthy for a method. Maybe some refactoring is in place?

> [Java Broker] Interleave calls to processPending with attempts to write outstanding data
> ----------------------------------------------------------------------------------------
>                 Key: QPID-6840
>                 URL: https://issues.apache.org/jira/browse/QPID-6840
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>            Reporter: Rob Godfrey
>            Assignee: Lorenz Quack
>             Fix For: qpid-java-6.0
> Currently NonBlockingConnection.doWork() completes all "pending" work before attempting
a write, and then processes incoming network reads.
> Instead we should ensure that once we have enough data to fill the send buffer, we should
perform a network write.  If we cannot write out enough data to the wire, we should stop processing
pending work (which will consuming direct memory which cannot be reclaimed until the buffers
are written).

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message