From dev-return-51309-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon Apr 30 09:38:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A6174180647 for ; Mon, 30 Apr 2018 09:38:04 +0200 (CEST) Received: (qmail 66805 invoked by uid 500); 30 Apr 2018 07:38:03 -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 66794 invoked by uid 99); 30 Apr 2018 07:38:03 -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; Mon, 30 Apr 2018 07:38:03 +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 7AC42C0334 for ; Mon, 30 Apr 2018 07:38:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, 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 xzDk0i_g-b5E for ; Mon, 30 Apr 2018 07:38: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 7F5D05F576 for ; Mon, 30 Apr 2018 07: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 B2FA7E0CB8 for ; Mon, 30 Apr 2018 07: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 1DF4621294 for ; Mon, 30 Apr 2018 07:38:00 +0000 (UTC) Date: Mon, 30 Apr 2018 07:38:00 +0000 (UTC) From: "Ohad Shacham (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4484) Write directly to HBase when creating an index for transactional table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-4484?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 458377#comment-16458377 ]=20 Ohad Shacham commented on PHOENIX-4484: --------------------------------------- [~jamestaylor],=C2=A0I think that I was wrong in this case and disabling th= e=C2=A0GC=C2=A0is not required. A general transaction might miss data if th= e low watermark exceeds the transaction timestamp during its run. This caus= ed by the GC that=C2=A0removes all the versions of the key below the low wa= termark, except for the last one.=C2=A0=C2=A0During index population, the t= ransaction has the fence id and it writes the data using auto commit (versi= on and commit timestamp are the same) and does not need to commit.=C2=A0 It is true that this transaction might miss data if the low watermark excee= ds the fence id, however, if it misses data of a key K, it means that there= exists another record of K with a version higher than the fence and lower = than the low watermark. Because every entry written after the fence will be= automatically added to the index (using the incremental mechanism) then th= e entry of K will be added to the index as well. It is true that we miss da= ta, however, every transaction that might be interested in this data starte= d below the low watermark and will be aborted on commit, so we don't really= care.=C2=A0 To sum up, the fact that at the fence, we=C2=A0enable the mechanism that up= dates=C2=A0the index with every mutation to the data table. Removes the nee= d to disable the GC. =C2=A0 > Write directly to HBase when creating an index for transactional table > ---------------------------------------------------------------------- > > Key: PHOENIX-4484 > URL: https://issues.apache.org/jira/browse/PHOENIX-4484 > Project: Phoenix > Issue Type: Sub-task > Reporter: Ohad Shacham > Assignee: Ohad Shacham > Priority: Major > > Today, when creating an index table for a non empty data table. The write= s are performed using the transaction api and both consumes client side mem= ory, for storing the writeset, and checks for conflict analysis upon commit= . This is redundant and can be replaced by direct write to HBase. For this = reason, a new function in the transaction abstraction layer should be added= that writes directly to HBase at the Tephra's case and adds shadow cells w= ith the fence id at the Omid case.=20 -- This message was sent by Atlassian JIRA (v7.6.3#76005)