[ https://issues.apache.org/jira/browse/HBASE-17647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877532#comment-15877532 ]
stack commented on HBASE-17647: ------------------------------- How'd you figure this one? 255 if (this.buf.hasArray()) { 256 return ClassSize.align(FIXED_OVERHEAD + length); 257 } 258 return ClassSize.align(FIXED_OVERHEAD); Could we have better names for params so clear what the different sizes are: void setSizeProgress(long sizeProgress, long heapSizeProgress) { ... for example, you have better naming here: void incrementSizeProgress(long dataSize, long heapSize) { It looks like 'size' is 'data' size and it is everything and then heap is less than 'data': 189 void setSizeProgress(long sizeProgress, long heapSizeProgress) { Is it written up somewhere how data relates to heap? It is not in this patch. Otherwise looks good [~anoop.hbase] How I know the calculation is being doine right? Thanks sir. > OffheapKeyValue#heapSize() implementation is wrong > -------------------------------------------------- > > Key: HBASE-17647 > URL: https://issues.apache.org/jira/browse/HBASE-17647 > Project: HBase > Issue Type: Sub-task > Components: regionserver > Reporter: Anoop Sam John > Assignee: Anoop Sam John > Fix For: 2.0.0 > > Attachments: HBASE-17647.patch, HBASE-17647_V2.patch > > > We consider the key and data lengths also even though the data is actually in > off heap area. We should correct it. > The impact will be at ScannerContext limit tracking where we use heapSize of > cells to account the result size. So my proposal is to consider the cells > length and heap size in Limit tracking and accounting. We have a > maxResultSize which defaults to 2MB. When the sum of all cell's data size > reaches 'maxResultSize' OR the sum of all cell's heap size reaches > 'maxResultSize' , we need to send back the RPC response -- This message was sent by Atlassian JIRA (v6.3.15#6346)