hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Feng Honghua (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10539) HRegion.addAndGetGlobalMemstoreSize() is expected to return the new memstore size after added, but actually the previous size before added is returned instead
Date Fri, 14 Feb 2014 16:01:20 GMT

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

Feng Honghua commented on HBASE-10539:
--------------------------------------

Seems almost all branches have the same problem, I just checked and confirmed both 0.94 and
0.98 have.

> HRegion.addAndGetGlobalMemstoreSize() is expected to return the new memstore size after
added, but actually the previous size before added is returned instead
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-10539
>                 URL: https://issues.apache.org/jira/browse/HBASE-10539
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>            Reporter: Feng Honghua
>            Assignee: Feng Honghua
>         Attachments: HBASE-10539-trunk_v1.patch
>
>
> HRegion.addAndGetGlobalMemstoreSize(addedSize) is called once some write succeeds and
'addedSize' is the size of the edits newly put to the memstore, the returned value of HRegion.addAndGetGlobalMemstoreSize(addedSize)
is then checked against the flush threshold to determine if a flush for the region should
be triggered.
> By design the returned value should be the updated memstore size after adding 'addedSize',
but current implementation uses this.memstoreSize.getAndAdd which returns the previous size
before adding, actually 'addAndGet' rather than 'getAndAdd' should be used here.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message