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 96439200BD4 for ; Thu, 17 Nov 2016 05:08:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 94975160B13; Thu, 17 Nov 2016 04:08:00 +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 0F615160B08 for ; Thu, 17 Nov 2016 05:07:59 +0100 (CET) Received: (qmail 98439 invoked by uid 500); 17 Nov 2016 04:07:59 -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 98428 invoked by uid 99); 17 Nov 2016 04:07:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 04:07:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id F0E6E2C4C74 for ; Thu, 17 Nov 2016 04:07:58 +0000 (UTC) Date: Thu, 17 Nov 2016 04:07:58 +0000 (UTC) From: "binlijin (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17118) StoreScanner leaked in KeyValueHeap MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 17 Nov 2016 04:08:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672657#comment-15672657 ] binlijin commented on HBASE-17118: ---------------------------------- Ok, done > StoreScanner leaked in KeyValueHeap > ----------------------------------- > > Key: HBASE-17118 > URL: https://issues.apache.org/jira/browse/HBASE-17118 > Project: HBase > Issue Type: Bug > Reporter: binlijin > Assignee: binlijin > Attachments: HBASE-17118-master_v1.patch, HBASE-17118-master_v2.patch, StoreScanner.png, StoreScannerLeakHeap.png > > > KeyValueHeap#generalizedSeek > KeyValueScanner scanner = current; > while (scanner != null) { > Cell topKey = scanner.peek(); > ...... > boolean seekResult; > if (isLazy && heap.size() > 0) { > // If there is only one scanner left, we don't do lazy seek. > seekResult = scanner.requestSeek(seekKey, forward, useBloom); > } else { > seekResult = NonLazyKeyValueScanner.doRealSeek(scanner, seekKey, > forward); > } > ...... > scanner = heap.poll(); > } > (1) scanner = heap.poll(); Retrieves and removes the head of this queue > (2) scanner.requestSeek(seekKey, forward, useBloom); or NonLazyKeyValueScanner.doRealSeek(scanner, seekKey, forward); > throw exception, and scanner will have no chance to close, so will cause the scanner leak. -- This message was sent by Atlassian JIRA (v6.3.4#6332)