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 E2E9A10D9F for ; Fri, 1 Nov 2013 06:13:24 +0000 (UTC) Received: (qmail 95769 invoked by uid 500); 1 Nov 2013 06:13:24 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 95186 invoked by uid 500); 1 Nov 2013 06:13:19 -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 95149 invoked by uid 99); 1 Nov 2013 06:13:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 06:13:17 +0000 Date: Fri, 1 Nov 2013 06:13:17 +0000 (UTC) From: "Anoop Sam John (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-9870) HFileDataBlockEncoderImpl#diskToCacheFormat uses wrong format 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-9870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811072#comment-13811072 ] Anoop Sam John commented on HBASE-9870: --------------------------------------- Yes this is to avoid a decode and then encode in the read path which is costly. At any point of time there can be only same type of encoding for OnDisk and InCache for a CF. (If OnDisk != None) But when we alter the encoding for a CF!!! Yes at time also both in cache and on disk are same.. But the existing data!!! On disk that can be in another encoding format.. So this is an issue. Very good finding Jimmy.. > HFileDataBlockEncoderImpl#diskToCacheFormat uses wrong format > ------------------------------------------------------------- > > Key: HBASE-9870 > URL: https://issues.apache.org/jira/browse/HBASE-9870 > Project: HBase > Issue Type: Bug > Reporter: Jimmy Xiang > > In this method, we have > {code} > if (block.getBlockType() == BlockType.ENCODED_DATA) { > if (block.getDataBlockEncodingId() == onDisk.getId()) { > // The block is already in the desired in-cache encoding. > return block; > } > {code} > This assumes onDisk encoding is the same as that of inCache. This is not true when we change the encoding of a CF. This could be one of the reasons I got data loss with online encoding change? > If I make sure onDisk == inCache all the time, my ITBLL with online encoding change worked once for me. -- This message was sent by Atlassian JIRA (v6.1#6144)