You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Allan Yang (JIRA)" <ji...@apache.org> on 2018/08/09 03:34:00 UTC
[jira] [Created] (HBASE-21029) Miscount of memstore's heap/offheap
size if same cell was put
Allan Yang created HBASE-21029:
----------------------------------
Summary: Miscount of memstore's heap/offheap size if same cell was put
Key: HBASE-21029
URL: https://issues.apache.org/jira/browse/HBASE-21029
Project: HBase
Issue Type: Bug
Affects Versions: 2.0.1, 2.1.0
Reporter: Allan Yang
Assignee: Allan Yang
We are now using memstore.heapSize() + memstore.offheapSize() to decide whether a flush is needed. But, if a same cell was put again in memstore, only the memstore's dataSize will be increased, the heap/offheap size won't. Actually, if MSLAB is used, the heap/offheap will increase no matter the cell is added or not. IIRC, memstore's heap/offheap size should always bigger than data size. We introduced heap/offheap size besides data size to reflect memory footprint more precisely.
{code}
// If there's already a same cell in the CellSet and we are using MSLAB, we must count in the
// MSLAB allocation size as well, or else there will be memory leak (occupied heap size larger
// than the counted number)
if (succ || mslabUsed) {
cellSize = getCellLength(cellToAdd);
}
// heap/offheap size is changed only if the cell is truly added in the cellSet
long heapSize = heapSizeChange(cellToAdd, succ);
long offHeapSize = offHeapSizeChange(cellToAdd, succ);
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)