Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B49D910AE2 for ; Fri, 14 Feb 2014 15:53:23 +0000 (UTC) Received: (qmail 74314 invoked by uid 500); 14 Feb 2014 15:53:21 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 74219 invoked by uid 500); 14 Feb 2014 15:53:20 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 74202 invoked by uid 99); 14 Feb 2014 15:53:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 15:53:20 +0000 Date: Fri, 14 Feb 2014 15:53:19 +0000 (UTC) From: "Feng Honghua (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-10539) HRegion.addAndGetGlobalMemstoreSize() is expected to return the new memstore size after added, but actually the previous size before added is returned instead MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-10539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Feng Honghua updated HBASE-10539: --------------------------------- Status: Patch Available (was: Open) > 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)