DESCRIPTION

JVMCBC-84: Retain() instead of copy() in KeyValueHandler on content.

Motivation
----------
In the current codebase, the ByteBuf of the content body is copied before
passing to the higher levels. It turns out, this has been in place because
the netty decoder will free the original buffers.

This leads to higher TLAB allocation pressure than needed.

Modifications
-------------
By just retain()ining instead of copy()ing the content ByteBuf, we keep
control and avoid copying data around unnecessarily.

Result
------
Half the TLAB allocations, especially important on larger get requests
to reduce the work on the pool.

Change-Id: If4dbedb6a9022b5fd911feba1fbff4fc0da12b83
Reviewed-on: http://review.couchbase.org/44349
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2014-12-15 15:35:22.062000000

Change has been successfully cherry-picked as d586ba7dfd9e55dcb22fdb7cae1b0e6bd71ec726

-------------------------------------
