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 2D0BBD330 for ; Wed, 27 Jun 2012 07:29:47 +0000 (UTC) Received: (qmail 36851 invoked by uid 500); 27 Jun 2012 07:29:47 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 36635 invoked by uid 500); 27 Jun 2012 07:29:46 -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 36594 invoked by uid 99); 27 Jun 2012 07:29:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2012 07:29:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 608B61418F1 for ; Wed, 27 Jun 2012 07:29:44 +0000 (UTC) Date: Wed, 27 Jun 2012 07:29:44 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@hbase.apache.org Message-ID: <1975544854.60773.1340782184400.JavaMail.jiratomcat@issues-vm> In-Reply-To: <179104367.55582.1340702623740.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HBASE-6269) Lazyseek should use the maxSequenseId StoreFile's KeyValue as the latest KeyValue 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-6269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402023#comment-13402023 ] Hadoop QA commented on HBASE-6269: ---------------------------------- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12533611/runAllTests.out.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2271//console This message is automatically generated. > Lazyseek should use the maxSequenseId StoreFile's KeyValue as the latest KeyValue > --------------------------------------------------------------------------------- > > Key: HBASE-6269 > URL: https://issues.apache.org/jira/browse/HBASE-6269 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.94.0 > Reporter: ShiXing > Assignee: ShiXing > Attachments: HBASE-6269-trunk-V1.patch, HBASE-6269-v1.patch, runAllTests.out.txt > > > When I fix the bug HBASE-6195, there is happened to find sometimes the test case will fail, https://builds.apache.org/job/HBase-0.94/259/. > If there are two Put/Increment with same row, family, qualifier, timestamp and different memstoreTS, after each Put/Increment, we do a memstore flush. So there will be two StoreFile with same KeyValue(except memstoreTS and SequenceId). > When I got the row, I always got the old records, the test case like this: > {code} > public void testPutWithMemStoreFlush() throws Exception { > Configuration conf = HBaseConfiguration.create(); > String method = "testPutWithMemStoreFlush"; > byte[] tableName = Bytes.toBytes(method); > byte[] family = Bytes.toBytes("family");; > byte[] qualifier = Bytes.toBytes("qualifier"); > byte[] row = Bytes.toBytes("putRow"); > byte[] value = null; > this.region = initHRegion(tableName, method, conf, family); > Put put = null; > Get get = null; > List kvs = null; > Result res = null; > > put = new Put(row); > value = Bytes.toBytes("value0"); > put.add(family, qualifier, 1234567l, value); > region.put(put); > System.out.print("get value before flush after put value0 : "); > get = new Get(row); > get.addColumn(family, qualifier); > get.setMaxVersions(); > res = this.region.get(get, null); > kvs = res.getColumn(family, qualifier); > for (int i = 0; i < kvs.size(); i++) { > System.out.println(Bytes.toString(kvs.get(i).getValue())); > } > region.flushcache(); > > System.out.print("get value after flush after put value0 : "); > get = new Get(row); > get.addColumn(family, qualifier); > get.setMaxVersions(); > res = this.region.get(get, null); > kvs = res.getColumn(family, qualifier); > for (int i = 0; i < kvs.size(); i++) { > System.out.println(Bytes.toString(kvs.get(i).getValue())); > } > > put = new Put(row); > value = Bytes.toBytes("value1"); > put.add(family, qualifier, 1234567l, value); > region.put(put); > System.out.print("get value before flush after put value1 : "); > get = new Get(row); > get.addColumn(family, qualifier); > get.setMaxVersions(); > res = this.region.get(get, null); > kvs = res.getColumn(family, qualifier); > for (int i = 0; i < kvs.size(); i++) { > System.out.println(Bytes.toString(kvs.get(i).getValue())); > } > region.flushcache(); > System.out.print("get value after flush after put value1 : "); > get = new Get(row); > get.addColumn(family, qualifier); > get.setMaxVersions(); > res = this.region.get(get, null); > kvs = res.getColumn(family, qualifier); > for (int i = 0; i < kvs.size(); i++) { > System.out.println(Bytes.toString(kvs.get(i).getValue())); > } > > put = new Put(row); > value = Bytes.toBytes("value2"); > put.add(family, qualifier, 1234567l, value); > region.put(put); > System.out.print("get value before flush after put value2 : "); > get = new Get(row); > get.addColumn(family, qualifier); > get.setMaxVersions(); > res = this.region.get(get, null); > kvs = res.getColumn(family, qualifier); > for (int i = 0; i < kvs.size(); i++) { > System.out.println(Bytes.toString(kvs.get(i).getValue())); > } > region.flushcache(); > System.out.print("get value after flush after put value2 : "); > get = new Get(row); > get.addColumn(family, qualifier); > get.setMaxVersions(); > res = this.region.get(get, null); > kvs = res.getColumn(family, qualifier); > for (int i = 0; i < kvs.size(); i++) { > System.out.println(Bytes.toString(kvs.get(i).getValue())); > } > } > {code} > and the result print as followed: > {code} > get value before flush after put value0 : value0 > get value after flush after put value0 : value0 > get value before flush after put value1 : value1 > get value after flush after put value1 : value0 > get value before flush after put value2 : value2 > get value after flush after put value2 : value0 > {code} > I analyze the code for StoreFileScanner with lazy seek, the StoreFileScanners are sorted by SequenceId, so the latest StoreFile is on the top KeyValueHeap, and the KeyValue for latest StoreFile will comapre to the second latest StoreFile, but the second latest StoreFile generated the fake row for same row, family, qualifier excepts the timestamp( maximum), memstoreTS(0). And the latest KeyValue recognized as not latest than the second latest. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira