You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Chia-Ping Tsai (JIRA)" <ji...@apache.org> on 2017/12/24 10:53:00 UTC

[jira] [Created] (HBASE-19607) throw the exception if memstore is incompetent to do the deep clone for cell

Chia-Ping Tsai created HBASE-19607:
--------------------------------------

             Summary: throw the exception if memstore is incompetent to do the deep clone for cell
                 Key: HBASE-19607
                 URL: https://issues.apache.org/jira/browse/HBASE-19607
             Project: HBase
          Issue Type: Bug
            Reporter: Chia-Ping Tsai
            Priority: Trivial


We must to clone the cell since the cell is backed by the reusable byte array. Also, we assume all cells passed to AbstractMemStore is of ExtendedCell. Not only is the type check unnecessary, but it also confuses the readers. 
{code:title=AbstractMemStore.java}
  private static Cell deepCopyIfNeeded(Cell cell) {
    if (cell instanceof ExtendedCell) {
      return ((ExtendedCell) cell).deepClone();
    }
    return cell;
  }
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)