[ 
https://issues.apache.org/jira/browse/CASSANDRA-6861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990809#comment-13990809
 ] 

Benedict commented on CASSANDRA-6861:
-------------------------------------

bq. the main place an exception

Right, agreed - that's why it's a nit :)  - but it would be nice to handle 
cases where we encounter an exception between further up in the pipeline where 
we allocate buffers and the dispatcher that executes them. This is probably 
more important if you address point (2) below

Also, just had a closer look at the full patch, and noticed a couple of other 
things:

# CBUtil.readValue is potentially leaking references - since we never return 
the ByteBuf we allocate we can never release it.
# It would be nice if the compressor/decompressor stages could also use an 
allocator (obviously one that is always byte-array backed) so that they do not 
create unnecessary garbage.
# OptionCode.encode could do the same - since we never use it it's not 
currently a problem, but perhaps we should wrap() an explicit byte[] in that 
method just in case Unpooled decides to allocate an off-heap buffer

> Optimise our Netty 4 integration
> --------------------------------
>
>                 Key: CASSANDRA-6861
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6861
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: performance
>             Fix For: 2.1 rc1
>
>
> Now we've upgraded to Netty 4, we're generating a lot of garbage that could 
> be avoided, so we should probably stop that. Should be reasonably easy to 
> hook into Netty's pooled buffers, returning them to the pool once a given 
> message is completed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to