[ https://issues.apache.org/jira/browse/HBASE-9785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13797408#comment-13797408 ]
Himanshu Vashishtha commented on HBASE-9785: -------------------------------------------- There are 5 boolean variables instead of 4: {code} 2013-10-16 16:13:49,071 DEBUG [main] util.ClassSize(252): 28 isLoadingCfsOnDemandDefault boolean 2013-10-16 16:13:49,071 DEBUG [main] util.ClassSize(252): 32 disallowWritesInRecovering boolean 2013-10-16 16:13:49,071 DEBUG [main] util.ClassSize(252): 33 isRecovering boolean 2013-10-16 16:13:49,074 DEBUG [main] util.ClassSize(252): 47 splitRequest boolean 2013-10-16 16:13:49,075 DEBUG [main] util.ClassSize(252): 55 deferredLogSyncDisabled boolean {code} > Fix heap size reporting in HRegion > ---------------------------------- > > Key: HBASE-9785 > URL: https://issues.apache.org/jira/browse/HBASE-9785 > Project: HBase > Issue Type: Bug > Affects Versions: 0.96.0 > Reporter: Himanshu Vashishtha > Fix For: 0.98.0, 0.96.1 > > > The size reported by Fixed_Overhead variable in HRegion misses out on a > boolean variable. TestHeapSize doesn't report it because of the alignment we > do to make it multiple of 8. > The equation for HRegion heap usage from Fixed_Overhead is: > Fixed_Overhead = align(100 + 42*ref + 1 arr) = align(284) = 288 on a 32 bit vm > (On a 32 bit vm, 1 ref = 4bytes, 1 arr = 16 bytes) > The equation formed using reflection (in Classsize) is: > Expected_Overehead = align(101 + 42*ref + 1arr) = align(285) = 288. > So, the testHeapSize doesn't fail currently. > But if I add a reference (did in last patch in 8741), it starts failing > because, now the equations are: > Fixed_Overhead = align(100 + 43*ref + 1 arr) = align(288) = 288 > Expected_Overhead = align(101 + 43*ref + 1 arr) = align(289) = 296. -- This message was sent by Atlassian JIRA (v6.1#6144)