Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Description
The AbstractKeyValueOperation::sendPutOperation or AbstractKeyOperation::sendKeyOperation use a weird pattern of handling with the HeaderParams: In HotRodOperation::writeHeaders the params are allocated on heap and then a reference to the object is returned. sendPutOperation dereferences this reference to pointer, stores it in scoped pointer and then passes the params by reference to readHeaderAndValidate. Then the scoped pointer is destructed, deallocating the params.
Instead, the sendPutOperation should construct the params on stack, pass it by reference to writeHeaders and then to readHeaderAndValidate. This requires a decent modification of the HotRodOperation api, but we wouldn't allocate and destroy objects on stack for each request!