DESCRIPTION

JVMCBC-77: KeyValue content and extras need to be retained.

Motivation
----------
When using profiling tools, it was discovered that lots of exceptions
were thrown as part of the writing process, but hidden because a
Void future was used on those IO write operations. This is fixed in a
separate commit (JVMCBC-76).

As part of the investigation, it was discovered that the ByteBufs
referenced (content and extras) need to be manually retained, because
the MessageToMessageEncoder frees them as it sees fit and otherwise
the code ends up in reference count exceptions (double freeing).

Modifications
-------------
Properly retaining extras and/or content when they are set on the
request.

Result
------
No more reference count exceptions as part of the writing process.

Change-Id: Idfd411082014fbcd87cec31ad33cb7acd5740dc1
Reviewed-on: http://review.couchbase.org/43786
Reviewed-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Cory Peck xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2014-12-01 16:23:27.384000000

Change has been successfully cherry-picked as b625eef8513948d6c6d3d44acc1b659d03dc3459

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