Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCEC317758 for ; Mon, 5 Jan 2015 23:54:35 +0000 (UTC) Received: (qmail 5308 invoked by uid 500); 5 Jan 2015 23:54:36 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 5271 invoked by uid 500); 5 Jan 2015 23:54:35 -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 5241 invoked by uid 99); 5 Jan 2015 23:54:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jan 2015 23:54:35 +0000 Date: Mon, 5 Jan 2015 23:54:35 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-12802) Remove unnecessary Table.flushCommits() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-12802: --------------------------- Status: Open (was: Patch Available) > Remove unnecessary Table.flushCommits() > --------------------------------------- > > Key: HBASE-12802 > URL: https://issues.apache.org/jira/browse/HBASE-12802 > Project: HBase > Issue Type: Sub-task > Affects Versions: 1.0.0, 2.0.0 > Reporter: Solomon Duskis > Assignee: Solomon Duskis > Attachments: HBASE-12802.patch, HBASE-12802B.patch > > > It looks like there are a lot of places where flushCommits() are called on tables that do not have autoFlush turned on. That might be a legacy concern from pre-autoFlush days. HBASE-12728 will likely result in removing the flushCommits() method from Table. The patch for this issue should remove all unnecessary calls to flushCommit() to prepare for the full fix. > flushCommits() are only necessary after a setAutoFlushTo(false) is called. Here's the relevant code from HTable.java: > {code:title=HTable.java|borderStyle=solid} > @Override > public void put(final Put put) > throws InterruptedIOException, RetriesExhaustedWithDetailsException { > doPut(put); > if (autoFlush) { > flushCommits(); > } > } > /** > * {@inheritDoc} > */ > @Override > public void put(final List puts) > throws InterruptedIOException, RetriesExhaustedWithDetailsException { > for (Put put : puts) { > doPut(put); > } > if (autoFlush) { > flushCommits(); > } > } > {code} > Puts have implicit flushCommits() calls when autoFlush is true. Deletes are not affected by autoFlush() and are not directly impacted by flushCommits() since deletes are not added to the writeAysncBuffer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)