Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 58BAC200CE6 for ; Thu, 17 Aug 2017 04:31:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56B7516A0FD; Thu, 17 Aug 2017 02:31:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9CBAA16A0F8 for ; Thu, 17 Aug 2017 04:31:05 +0200 (CEST) Received: (qmail 19164 invoked by uid 500); 17 Aug 2017 02:31: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 19147 invoked by uid 99); 17 Aug 2017 02:31:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2017 02:31:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EF904180775 for ; Thu, 17 Aug 2017 02:31:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qoQmFkZFLrqB for ; Thu, 17 Aug 2017 02:31:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 92FEA5F257 for ; Thu, 17 Aug 2017 02:31:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D3FC5E0BD0 for ; Thu, 17 Aug 2017 02:31:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6775E2537F for ; Thu, 17 Aug 2017 02:31:00 +0000 (UTC) Date: Thu, 17 Aug 2017 02:31:00 +0000 (UTC) From: "Chia-Ping Tsai (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18471) The DeleteFamily cell is skipped when StoreScanner seeks to next column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 17 Aug 2017 02:31:06 -0000 [ https://issues.apache.org/jira/browse/HBASE-18471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16129780#comment-16129780 ] Chia-Ping Tsai commented on HBASE-18471: ---------------------------------------- The bug is due to the key returned from getKeyForNextColumn(). The key say that *we should skip all cells which have the same qualifier with current cell*, so the DeleteFamily is skipped. ex1: Put (qual1), Delete family, put(qual0, val0), put(qual0, val1) The *DeleteFamily* always peeks out as the first Cell, so every thing works fine. ex2: Put (qual1), Delete family, put(empty, val0), put(empty, val1) The *put(empty, val1)* always peeks out as the first Cell. After put(empty, val0) peeks out, the matcher say "SeekNextColumn". StoreScanner use the key from matcher#getKeyForNextColumn() to seek next column. The layout of the key is shown below: |row|fam|empty|HConstants.OLDEST_TIMESTAMP|Type.Minimum| Hence, the DeleteFamily is skipped because it is larger than the key. bq. Ideally a cell with qualifier qual0 and a cell without qualifier the cell without qualifier should sort first and then the cell with qualifier. It seems to me that the CellComparator works normally about this. bq. I think in CellComparator#compareColums if we can handle this then we are able to solve this issue? Pardon me, I fail to catch what you mean here. > The DeleteFamily cell is skipped when StoreScanner seeks to next column > ----------------------------------------------------------------------- > > Key: HBASE-18471 > URL: https://issues.apache.org/jira/browse/HBASE-18471 > Project: HBase > Issue Type: Bug > Components: Deletes, hbase, scan > Affects Versions: 3.0.0, 1.3.0, 1.3.1, 2.0.0-alpha-1 > Reporter: Thomas Martens > Assignee: Chia-Ping Tsai > Priority: Critical > Fix For: 2.0.0, 1.4.0, 1.3.2, 1.5.0, 1.2.7 > > Attachments: HBASE-18471.branch-1.2.v0.patch, HBASE-18471.v0.patch, HBASE-18471.v1.patch, HBaseDmlTest.java > > > The qualifier of a deleted row (with keep deleted cells true) re-appears after re-inserting the same row multiple times (with different timestamp) with an empty qualifier. > Scenario: > # Put row with family and qualifier (timestamp 1). > # Delete entire row (timestamp 2). > # Put same row again with family without qualifier (timestamp 3). > A scan (latest version) returns the row with family without qualifier, version 3 (which is correct). > # Put the same row again with family without qualifier (timestamp 4). > A scan (latest version) returns multiple rows: > * the row with family without qualifier, version 4 (which is correct). > * the row with family with qualifier, version 1 (which is wrong). > There is a test scenario attached. > output: > 13:42:53,952 [main] client.HBaseAdmin - Started disable of test_dml > 13:42:55,801 [main] client.HBaseAdmin - Disabled test_dml > 13:42:57,256 [main] client.HBaseAdmin - Deleted test_dml > 13:42:58,592 [main] client.HBaseAdmin - Created test_dml > Put row: 'myRow' with family: 'myFamily' with qualifier: 'myQualifier' with timestamp: '1' > Scan printout => > Row: 'myRow', Timestamp: '1', Family: 'myFamily', Qualifier: 'myQualifier', Value: 'myValue' > Delete row: 'myRow' > Scan printout => > Put row: 'myRow' with family: 'myFamily' with qualifier: 'null' with timestamp: '3' > Scan printout => > Row: 'myRow', Timestamp: '3', Family: 'myFamily', Qualifier: '', Value: 'myValue' > Put row: 'myRow' with family: 'myFamily' with qualifier: 'null' with timestamp: '4' > Scan printout => > Row: 'myRow', Timestamp: '4', Family: 'myFamily', Qualifier: '', Value: 'myValue' > {color:red}Row: 'myRow', Timestamp: '1', Family: 'myFamily', Qualifier: 'myQualifier', Value: 'myValue'{color} -- This message was sent by Atlassian JIRA (v6.4.14#64029)