Istvan Toth created PHOENIX-6670:
------------------------------------

             Summary: Optimize PhoenixKeyValueUtil#maybeCopyCell
                 Key: PHOENIX-6670
                 URL: https://issues.apache.org/jira/browse/PHOENIX-6670
             Project: Phoenix
          Issue Type: Improvement
          Components: core
    Affects Versions: 5.2.0
            Reporter: Istvan Toth


PhoenixKeyValueUtil#maybeCopyCell copies every cell that is not a KeyValue to a 
keyValue.

It's point is to copy Off-Heap cells to the Heap, so that the values are kept 
after the backing ByteBuffer is freed, and we avoid use-after-free errors.

However, checking if a Cell is a KeyValue instance is a poor indication for 
that, as there are a lot of Cell types that are not KeyValues, but are stored 
on the heap, and do not need to be copied.

Copying only ByteBufferExtendedCell instances instead would potentially be a 
significat performance gain.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to