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 CD2E0200CC1 for ; Mon, 10 Jul 2017 19:38:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CBA32163D20; Mon, 10 Jul 2017 17:38: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 1DABD163D1D for ; Mon, 10 Jul 2017 19:38:04 +0200 (CEST) Received: (qmail 67899 invoked by uid 500); 10 Jul 2017 17:38:04 -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 67888 invoked by uid 99); 10 Jul 2017 17:38:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2017 17:38:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A9C14193E4A for ; Mon, 10 Jul 2017 17:38:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id h_KQCRY9G9TW for ; Mon, 10 Jul 2017 17:38:02 +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 95E976251D for ; Mon, 10 Jul 2017 17:38: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 C4F18E0D7B for ; Mon, 10 Jul 2017 17:38: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 2ACFB24699 for ; Mon, 10 Jul 2017 17:38:00 +0000 (UTC) Date: Mon, 10 Jul 2017 17:38:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-3997) UngroupedAggregateRegionObserver.commitBatchWithHTable() should not check the memstore size and wait for flush. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 10 Jul 2017 17:38:06 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080718#comment-16080718 ] James Taylor commented on PHOENIX-3997: --------------------------------------- Just wanted to follow up on this, [~gjacoby]. I think we should keep the check only in the case where the source and target tables are the same. We'd need an additional boolean to be passed through commitBatchWithHTable and conditionally do the check if true in this case: {code} boolean isSameTable = Bytes.compareTo(targetHTable.getTableName(), region.getTableDesc().getTableName().getName()) == 0 {code} > UngroupedAggregateRegionObserver.commitBatchWithHTable() should not check the memstore size and wait for flush. > ---------------------------------------------------------------------------------------------------------------- > > Key: PHOENIX-3997 > URL: https://issues.apache.org/jira/browse/PHOENIX-3997 > Project: Phoenix > Issue Type: Bug > Reporter: Thomas D'Silva > Assignee: Geoffrey Jacoby > Fix For: 4.12.0 > > Attachments: PHOENIX-3997.patch > > > [~ankit.singhal] > In UngroupedAggregateRegionObserver.commitBatchWithHTable() do we need to check the memstore size and wait for the flush. We are using a htable to write the mutations. > {code} > // When memstore size reaches blockingMemstoreSize we are waiting 3 seconds for the > // flush happen which decrease the memstore size and then writes allowed on the region. > for (int i = 0; region.getMemstoreSize().get() > blockingMemstoreSize && i < 30; i++) { > try { > checkForRegionClosing(); > Thread.sleep(100); > } catch (InterruptedException e) { > Thread.currentThread().interrupt(); > throw new IOException(e); > } > } > logger.debug("Committing batch of " + mutations.size() + " mutations for " + table); > try { > table.batch(mutations); > } catch (InterruptedException e) { > throw new RuntimeException(e); > } > {code} > FYI [~jamestaylor] [~apurtell] -- This message was sent by Atlassian JIRA (v6.4.14#64029)