[ 
https://issues.apache.org/jira/browse/STORM-835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Joseph Evans resolved STORM-835.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 0.11.0

Thanks [~zhanghailei],  I merged this into master.

> Netty Client hold batch object until io operation complete
> ----------------------------------------------------------
>
>                 Key: STORM-835
>                 URL: https://issues.apache.org/jira/browse/STORM-835
>             Project: Apache Storm
>          Issue Type: Improvement
>    Affects Versions: 0.10.0
>            Reporter: zhanghailei
>            Assignee: zhanghailei
>            Priority: Minor
>             Fix For: 0.11.0
>
>
> Netty Client hold batch object until IO operation complete.
> Following code:
> {code:title=Client.java|borderStyle=solid}
>  final int numMessages = batch.size();
>         pendingMessages.getAndAdd(numMessages);
>         LOG.debug("writing {} messages to channel {}", batch.size(), 
> channel.toString());
>         ChannelFuture future = channel.write(batch);
>         future.addListener(new ChannelFutureListener() {
>             public void operationComplete(ChannelFuture future) throws 
> Exception {
>                 pendingMessages.getAndAdd(0 - numMessages);
>                 if (future.isSuccess()) {
>                     LOG.debug("sent {} messages to {}", numMessages, 
> dstAddressPrefixedName);
>                     messagesSent.getAndAdd(batch.size());
>                 }
> {code}
> batch will be a field of  anonymous inner classes.don't release after 
> channel.write() invoked,until IO operation complete.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to