Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@locus.apache.org Received: (qmail 71073 invoked from network); 16 Dec 2008 19:29:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2008 19:29:10 -0000 Received: (qmail 11084 invoked by uid 500); 16 Dec 2008 19:29:19 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 11019 invoked by uid 500); 16 Dec 2008 19:29:19 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 10694 invoked by uid 99); 16 Dec 2008 19:29:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 11:29:17 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 19:29:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 55956234C3F2 for ; Tue, 16 Dec 2008 11:28:44 -0800 (PST) Message-ID: <1018610469.1229455724349.JavaMail.jira@brutus> Date: Tue, 16 Dec 2008 11:28:44 -0800 (PST) From: "stack (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Commented: (HBASE-29) HStore#get and HStore#getFull may not return expected values by timestamp when there is more than one MapFile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12657124#action_12657124 ] stack commented on HBASE-29: ---------------------------- I'm thinking each edit needs to carry two timestamps to solve this issue, the user designated one and another that records actual insert time. The latter is used during major compactions figuring cell TTL and its used distingushing two edits of same r/c/t so we don't overwrite older vintage edits. > HStore#get and HStore#getFull may not return expected values by timestamp when there is more than one MapFile > ------------------------------------------------------------------------------------------------------------- > > Key: HBASE-29 > URL: https://issues.apache.org/jira/browse/HBASE-29 > Project: Hadoop HBase > Issue Type: Bug > Components: client, regionserver > Affects Versions: 0.1.2, 0.2.0 > Reporter: Bryan Duxbury > Priority: Minor > Attachments: 29.patch > > > Ok, this one is a little tricky. Let's say that you write a row with some value without a timestamp, thus meaning right now. Then, the memcache gets flushed out to a MapFile. Then, you write another value to the same row, this time with a timestamp that is in the past, ie, before the "now" timestamp of the first put. > Some time later, but before there is a compaction, if you do a get for this row, and only ask for a single version, you will logically be expecting the latest version of the cell, which you would assume would be the one written at "now" time. Instead, you will get the value written into the "past" cell, because even though it is tagged as having happened in the past, it actually *was written* after the "now" cell, and thus when #get searches for satisfying values, it runs into the one most recently written first. > The result of this problem is inconsistent data results. Note that this problem only ever exists when there's an uncompacted HStore, because during compaction, these cells will all get sorted into the correct order by timestamp and such. In a way, this actually makes the problem worse, because then you could easily get inconsistent results from HBase about the same (unchanged) row depending on whether there's been a flush/compaction. > The only solution I can think of for this problem at the moment is to scan all the MapFiles and Memcache for possible results, sort them, and then select the desired number of versions off of the top. This is unfortunate because it means you never get the snazzy shortcircuit logic except within a single mapfile or memcache. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.