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 35AC9200CA9 for ; Fri, 16 Jun 2017 14:29:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3443E160BDD; Fri, 16 Jun 2017 12:29:05 +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 7B51A160BD2 for ; Fri, 16 Jun 2017 14:29:04 +0200 (CEST) Received: (qmail 66969 invoked by uid 500); 16 Jun 2017 12:29:03 -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 66957 invoked by uid 99); 16 Jun 2017 12:29:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jun 2017 12:29:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 23F921A044C for ; Fri, 16 Jun 2017 12:29:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id NtO0vUMDboxx for ; Fri, 16 Jun 2017 12:29:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 0D4975FB71 for ; Fri, 16 Jun 2017 12:29: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 4F577E0012 for ; Fri, 16 Jun 2017 12:29: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 0B75623FFE for ; Fri, 16 Jun 2017 12:29:00 +0000 (UTC) Date: Fri, 16 Jun 2017 12:29:00 +0000 (UTC) From: "Duo Zhang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18221) Switch from pread to stream should happen under HStore's reentrant lock MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 16 Jun 2017 12:29:05 -0000 [ https://issues.apache.org/jira/browse/HBASE-18221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16051830#comment-16051830 ] Duo Zhang commented on HBASE-18221: ----------------------------------- So add a new method to HStore which will return both storefiles and compactedfiles at once? Or push some logic in the trySwitchToStreamRead method down to HStore? I mean, just collect the file paths in trySwitchToStreamRead, and pass the paths to HStore, HStore will give us the store files for these paths. Thanks. > Switch from pread to stream should happen under HStore's reentrant lock > ----------------------------------------------------------------------- > > Key: HBASE-18221 > URL: https://issues.apache.org/jira/browse/HBASE-18221 > Project: HBase > Issue Type: Sub-task > Components: Scanners > Affects Versions: 2.0.0, 3.0.0, 2.0.0-alpha-1 > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Fix For: 2.0.0, 3.0.0, 2.0.0-alpha-2 > > > Found this while debugging HBASE-18186. When we try to reopen the scanners on the storefiles while trying to switch over from pread to stream, we do not use the HStore's reentrant lock to get the current Storefiles from the StoreFileManager. All the scan APIs are guarded under that and we must do it here also other wise the CompactedHfileDischarger may cause race issues with the HStore's datastructures like here > {code} > 2017-06-14 18:16:17,223 WARN [RpcServer.default.FPBQ.Fifo.handler=23,queue=1,port=16020] regionserver.StoreScanner: failed to switch to stream read > java.lang.NullPointerException > at org.apache.hadoop.hbase.regionserver.StoreFileScanner.getScannersForStoreFiles(StoreFileScanner.java:133) > at org.apache.hadoop.hbase.regionserver.HStore.getScanners(HStore.java:1221) > at org.apache.hadoop.hbase.regionserver.StoreScanner.trySwitchToStreamRead(StoreScanner.java:997) > at org.apache.hadoop.hbase.regionserver.StoreScanner.shipped(StoreScanner.java:1134) > at org.apache.hadoop.hbase.regionserver.KeyValueHeap.shipped(KeyValueHeap.java:445) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.shipped(HRegion.java:6459) > at org.apache.hadoop.hbase.regionserver.RSRpcServices$RegionScannerShippedCallBack.run(RSRpcServices.java:339) > at org.apache.hadoop.hbase.ipc.ServerCall.setResponse(ServerCall.java:252) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:166) > at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:278) > at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:258) > {code} > I have a working patch fixing this problem. Will do some more testing and try to upload the patch after I write a test case for this. -- This message was sent by Atlassian JIRA (v6.4.14#64029)