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 9BD6ECD10 for ; Fri, 3 Aug 2012 15:00:13 +0000 (UTC) Received: (qmail 5864 invoked by uid 500); 3 Aug 2012 15:00:04 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 5832 invoked by uid 500); 3 Aug 2012 15:00:04 -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 5823 invoked by uid 99); 3 Aug 2012 15:00:04 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 15:00:04 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id C3C52140541 for ; Fri, 3 Aug 2012 15:00:04 +0000 (UTC) Date: Fri, 3 Aug 2012 15:00:04 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: <1808374354.10578.1344006004809.JavaMail.jiratomcat@issues-vm> In-Reply-To: <591122692.25562.1341871257212.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HBASE-6359) KeyValue may return incorrect values after readFields() 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-6359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428146#comment-13428146 ] Hudson commented on HBASE-6359: ------------------------------- Integrated in HBase-0.94 #381 (See [https://builds.apache.org/job/HBase-0.94/381/]) HBASE-6359 KeyValue may return incorrect values after readFields() (Dave Revell) (Revision 1368967) Result = FAILURE tedyu : Files : * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/KeyValue.java > KeyValue may return incorrect values after readFields() > ------------------------------------------------------- > > Key: HBASE-6359 > URL: https://issues.apache.org/jira/browse/HBASE-6359 > Project: HBase > Issue Type: Bug > Reporter: Dave Revell > Assignee: Dave Revell > Labels: noob > Fix For: 0.96.0, 0.94.2 > > Attachments: HBASE-6359-trunk-v1.diff > > > When the same KeyValue object is used multiple times for deserialization using readFields, some methods may return incorrect values. Here is a sequence of operations that will reproduce the problem: > # A KeyValue is created whose key has length 10. The private field keyLength is initialized to 0. > # KeyValue.getKeyLength() is called. This reads the key length 10 from the backing array and caches it in keyLength. > # KeyValue.readFields() is called to deserialize a new value. The keyLength field is not cleared and keeps its value of 10, even though this value is probably incorrect. > # If getKeyLength() is called, the value 10 will be returned. > For example, in a reducer with Iterable, all values after the first one from the iterable are likely to return incorrect values from getKeyLength(). > The solution is to clear all memoized values in KeyValue.readFields(). I'll write a patch for this soon. -- 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