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 D5D46200C05 for ; Sun, 8 Jan 2017 14:55:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D47ED160B2C; Sun, 8 Jan 2017 13:55: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 2BB5E160B36 for ; Sun, 8 Jan 2017 14:55:00 +0100 (CET) Received: (qmail 7806 invoked by uid 500); 8 Jan 2017 13:54:59 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 7477 invoked by uid 99); 8 Jan 2017 13:54:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jan 2017 13:54:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BFAC22C2A6A for ; Sun, 8 Jan 2017 13:54:58 +0000 (UTC) Date: Sun, 8 Jan 2017 13:54:58 +0000 (UTC) From: "ChiaPing Tsai (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (PHOENIX-3576) ParallelWriterIndexCommitter should fail fast when writing the local index to the closing table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 08 Jan 2017 13:55:01 -0000 ChiaPing Tsai created PHOENIX-3576: -------------------------------------- Summary: ParallelWriterIndexCommitter should fail fast when writing the local index to the closing table Key: PHOENIX-3576 URL: https://issues.apache.org/jira/browse/PHOENIX-3576 Project: Phoenix Issue Type: Bug Affects Versions: 4.9.0 Reporter: ChiaPing Tsai ParallelWriterIndexCommitter uses the AP to update the local index after the region#batchMutate fails. If the region is splitting, all later updates will fail (RegionTooBusyException) due to the write lock. The AP will retry the failed updates until it reaches the retry threshold, so the read lock of region is released after a long time. The read lock blocks the HRegion#close, so the region splitting is also blocked. {noformat} try { if (allowLocalUpdates && env != null && tableReference.getTableName().equals( env.getRegion().getTableDesc().getNameAsString())) { try { throwFailureIfDone(); IndexUtil.writeLocalUpdates(env.getRegion(), mutations, true); return null; } catch (IOException ignord) { // when it's failed we fall back to the standard & slow way if (LOG.isDebugEnabled()) { LOG.debug("indexRegion.batchMutate failed and fall back to HTable.batch(). Got error=" + ignord); } } } table = factory.getTable(tableReference.get()); throwFailureIfDone(); table.batch(mutations); } catch (SingleIndexWriteFailureException e) { throw e; } catch (IOException e) { throw new SingleIndexWriteFailureException(tableReference.toString(), mutations, e); } catch (InterruptedException e) { // reset the interrupt status on the thread Thread.currentThread().interrupt(); throw new SingleIndexWriteFailureException(tableReference.toString(), mutations, e); } finally{ if (table != null) { table.close(); } } return null; {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)