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 CA2F2DCF0 for ; Sun, 30 Sep 2012 17:00:07 +0000 (UTC) Received: (qmail 91780 invoked by uid 500); 30 Sep 2012 17:00:07 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 91750 invoked by uid 500); 30 Sep 2012 17:00:07 -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 91741 invoked by uid 99); 30 Sep 2012 17:00:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Sep 2012 17:00:07 +0000 Date: Mon, 1 Oct 2012 04:00:07 +1100 (NCT) From: "ramkrishna.s.vasudevan (JIRA)" To: issues@hbase.apache.org Message-ID: <1993704585.145718.1349024407593.JavaMail.jiratomcat@arcas> In-Reply-To: <580132645.142900.1348918087633.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (HBASE-6900) RegionScanner.reseek() creates NPE when a flush or compaction happens before the reseek. 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-6900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ramkrishna.s.vasudevan updated HBASE-6900: ------------------------------------------ Attachment: HBASE-6900_1.patch Patch with fix. I have not run testsuite yet. The checkReseek() returns true if the heap is null. So both checkReseek and null check is needed i feel. Pls review and provide your comments/suggestions. > RegionScanner.reseek() creates NPE when a flush or compaction happens before the reseek. > ---------------------------------------------------------------------------------------- > > Key: HBASE-6900 > URL: https://issues.apache.org/jira/browse/HBASE-6900 > Project: HBase > Issue Type: Bug > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Attachments: HBASE-6900_1.patch, HBASE-6900.patch > > > HBASE-5520 introduced reseek() on the RegionScanner. > Now when a scanner is created we have the StoreScanner heap. After this if a flush or compaction happens parallely all the StoreScannerObservers are cleared so that whenever a new next() call happens we tend to recreate the scanner based on the latest store files. > The reseek() in StoreScanner expects the heap not to be null because always reseek would be called from next() > {code} > public synchronized boolean reseek(KeyValue kv) throws IOException { > //Heap cannot be null, because this is only called from next() which > //guarantees that heap will never be null before this call. > if (explicitColumnQuery && lazySeekEnabledGlobally) { > return heap.requestSeek(kv, true, useRowColBloom); > } else { > return heap.reseek(kv); > } > } > {code} > Now when we call RegionScanner.reseek() directly using CPs we tend to get a NPE. In our case it happened when a major compaction was going on. I will also attach a testcase to show the problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira