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 041DD200B3B for ; Sun, 26 Jun 2016 18:55:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 015CB160A5C; Sun, 26 Jun 2016 16:55:54 +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 527AA160A38 for ; Sun, 26 Jun 2016 18:55:53 +0200 (CEST) Received: (qmail 29002 invoked by uid 500); 26 Jun 2016 16:55:52 -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 28975 invoked by uid 99); 26 Jun 2016 16:55:52 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jun 2016 16:55:52 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 458E32C1F5D for ; Sun, 26 Jun 2016 16:55:52 +0000 (UTC) Date: Sun, 26 Jun 2016 16:55:52 +0000 (UTC) From: "Anoop Sam John (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16071) The VisibilityLabelFilter and AccessControlFilter should not count the "delete cell" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 26 Jun 2016 16:55:54 -0000 [ https://issues.apache.org/jira/browse/HBASE-16071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350180#comment-15350180 ] Anoop Sam John commented on HBASE-16071: ---------------------------------------- When Scan is set with rawScan and we have 2 versions deleted and another non deleted version. So there are total 5 cells (2 DELETE type and 3 PUT type) out of which only one is undeleted. How many cells we get back? (In normal scan case- no vis labels). Say scan maxVersions set to 2. > The VisibilityLabelFilter and AccessControlFilter should not count the "delete cell" > ------------------------------------------------------------------------------------ > > Key: HBASE-16071 > URL: https://issues.apache.org/jira/browse/HBASE-16071 > Project: HBase > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: ChiaPing Tsai > Assignee: ChiaPing Tsai > Priority: Minor > Fix For: 2.0.0, 1.3.0, 1.4.0 > > Attachments: HBASE-16071-v1.patch, HBASE-16071-v2.patch, HBASE-16071-v3.patch > > > The VisibilityLabelFilter will see and count the "delete cell" if the scan.isRaw() returns true, so the (put) cell will be skipped if it has lower version than "delete cell" > The critical code is shown below: > {code:title=VisibilityLabelFilter.java|borderStyle=solid} > public ReturnCode filterKeyValue(Cell cell) throws IOException { > if (curFamily.getBytes() == null > || !(CellUtil.matchingFamily(cell, curFamily.getBytes(), curFamily.getOffset(), > curFamily.getLength()))) { > curFamily.set(cell.getFamilyArray(), cell.getFamilyOffset(), cell.getFamilyLength()); > // For this family, all the columns can have max of curFamilyMaxVersions versions. No need to > // consider the older versions for visibility label check. > // Ideally this should have been done at a lower layer by HBase (?) > curFamilyMaxVersions = cfVsMaxVersions.get(curFamily); > // Family is changed. Just unset curQualifier. > curQualifier.unset(); > } > if (curQualifier.getBytes() == null > || !(CellUtil.matchingQualifier(cell, curQualifier.getBytes(), curQualifier.getOffset(), > curQualifier.getLength()))) { > curQualifier.set(cell.getQualifierArray(), cell.getQualifierOffset(), > cell.getQualifierLength()); > curQualMetVersions = 0; > } > curQualMetVersions++; > if (curQualMetVersions > curFamilyMaxVersions) { > return ReturnCode.SKIP; > } > return this.expEvaluator.evaluate(cell) ? ReturnCode.INCLUDE : ReturnCode.SKIP; > } > {code} > [VisibilityLabelFilter.java|https://github.com/apache/hbase/blob/d7a4499dfc8b3936a0eca867589fc2b23b597866/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityLabelFilter.java] -- This message was sent by Atlassian JIRA (v6.3.4#6332)