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 8D98819D4A for ; Thu, 28 Apr 2016 04:07:13 +0000 (UTC) Received: (qmail 27095 invoked by uid 500); 28 Apr 2016 04:07:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 26998 invoked by uid 500); 28 Apr 2016 04:07:13 -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 26983 invoked by uid 99); 28 Apr 2016 04:07:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2016 04:07:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id F21BF2C1F61 for ; Thu, 28 Apr 2016 04:07:12 +0000 (UTC) Date: Thu, 28 Apr 2016 04:07:12 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (HBASE-15676) FuzzyRowFilter fails and matches all the rows in the table if the mask consists of all 0s 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-15676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu reassigned HBASE-15676: ------------------------------ Assignee: Matt Warhaftig > FuzzyRowFilter fails and matches all the rows in the table if the mask consists of all 0s > ----------------------------------------------------------------------------------------- > > Key: HBASE-15676 > URL: https://issues.apache.org/jira/browse/HBASE-15676 > Project: HBase > Issue Type: Bug > Components: Filters > Affects Versions: 2.0.0, 0.98.13, 1.0.2, 1.2.0, 1.1.1 > Reporter: Rohit Sinha > Assignee: Matt Warhaftig > Attachments: hbase-15676-v1.patch, hbase-15676-v2.patch, hbase-15676-v3.patch, hbase-15676-v4.patch > > > While using FuzzyRowFilter we noticed that if the mask array consists of all 0s (fixed) the FuzzyRowFilter matches all the rows in the table. We noticed this on HBase 1.1, 1.2 and higher. > After some digging we suspect that this is because of isPreprocessedMask() check which is used in preprocessMask() which was added here: https://issues.apache.org/jira/browse/HBASE-13761 > If the mask consists of all 0s then the isPreprocessedMask() returns true and the preprocessing which responsible for changing 0s to -1 doesn't happen and hence all rows are matched in scan. > This scenario can be tested in TestFuzzyRowFilterEndToEnd#testHBASE14782() If we change the > byte[] fuzzyKey = Bytes.toBytesBinary("\\x00\\x00\\x044"); > byte[] mask = new byte[] {1,0,0,0}; > to > byte[] fuzzyKey = Bytes.toBytesBinary("\\x9B\\x00\\x044e"); > byte[] mask = new byte[] {0,0,0,0,0}; > We expect one match but this will match all the rows in the table. -- This message was sent by Atlassian JIRA (v6.3.4#6332)