You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Anoop Sam John (Jira)" <ji...@apache.org> on 2022/03/18 14:10:00 UTC

[jira] [Commented] (PHOENIX-6670) Optimize PhoenixKeyValueUtil#maybeCopyCell

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

Anoop Sam John commented on PHOENIX-6670:
-----------------------------------------

PhoenixKeyValueUtil  intent was to make sure all Cell instances are KeyValue objects?  It was this way initially.  (Atleast phoenix was using HBase's KVUtil in past and its intent was to use KV type).

> 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
>            Priority: Major
>
> 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)