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 9F1EA177AA for ; Thu, 5 Mar 2015 15:11:39 +0000 (UTC) Received: (qmail 39221 invoked by uid 500); 5 Mar 2015 15:11:39 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 39176 invoked by uid 500); 5 Mar 2015 15:11:39 -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 39164 invoked by uid 99); 5 Mar 2015 15:11:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2015 15:11:39 +0000 Date: Thu, 5 Mar 2015 15:11:39 +0000 (UTC) From: "ChiaPing Tsai (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-12931) The existing KeyValues in memstroe are not removed completely after inserting cell into memStore 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-12931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ChiaPing Tsai updated HBASE-12931: ---------------------------------- Attachment: (was: HBASE-12931.patch) > The existing KeyValues in memstroe are not removed completely after inserting cell into memStore > ------------------------------------------------------------------------------------------------- > > Key: HBASE-12931 > URL: https://issues.apache.org/jira/browse/HBASE-12931 > Project: HBase > Issue Type: Bug > Reporter: ChiaPing Tsai > Priority: Minor > Attachments: HBASE-12931 > > > If I'm not wrong, the UPSERT method of memStore should remove all existing KeyValues except the newer version. > In memStore, > {code:title=DefaultMemStore.java|borderStyle=solid} > int versIionsVisible = 0; > ... > if (cur.getTypeByte() == KeyValue.Type.Put.getCode() && > cur.getSequenceId() <= readpoint) { > if (versionsVisible > 1) { > // if we get here we have seen at least one version visible to the oldest scanner, > // which means we can prove that no scanner will see this version > // false means there was a change, so give us the size. > long delta = heapSizeChange(cur, true); > addedSize -= delta; > this.size.addAndGet(-delta); > it.remove(); > setOldestEditTimeToNow(); > } else { > versionsVisible++; > } > {code} > Does "versionsVisible > 1" should be changed to "versionsVisible >= 1" ? > thanks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)