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 3C177200CBE for ; Fri, 7 Jul 2017 20:13:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3A885169B05; Fri, 7 Jul 2017 18:13:04 +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 895E1169B07 for ; Fri, 7 Jul 2017 20:13:03 +0200 (CEST) Received: (qmail 58529 invoked by uid 500); 7 Jul 2017 18:13:02 -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 58513 invoked by uid 99); 7 Jul 2017 18:13:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2017 18:13:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1F836C0096 for ; Fri, 7 Jul 2017 18:13:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id L-_MPXibndTL for ; Fri, 7 Jul 2017 18:13:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id EAF6F5F299 for ; Fri, 7 Jul 2017 18:13:00 +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 81DA4E0984 for ; Fri, 7 Jul 2017 18:13: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 21C4124695 for ; Fri, 7 Jul 2017 18:13:00 +0000 (UTC) Date: Fri, 7 Jul 2017 18:13: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: Fri, 07 Jul 2017 18:13:04 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078477#comment-16078477 ] James Taylor commented on PHOENIX-3997: --------------------------------------- Just to confirm, [~sergey.soldatov] - this throttling we're doing is for cases in which we're reading and writing to the same region server, right? Even for the local index case, we'd be writing to a different region in a different store, but we know it'll be on the same region server. The commitBatchWithHTable is for cases in which we don't know whether the region we're writing to is on the same or a different region server. Worse-case, if we're writing to a new table, all writes could potentially be going to the same region server from which we're reading (at least until splits occur that move the region to a different region server). If the throttling is for reads/writes to the same region server, then I think we need more testing around the above case before we remove it. > 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)