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 69606200CD8 for ; Wed, 2 Aug 2017 22:30:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6755516A448; Wed, 2 Aug 2017 20:30: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 ADB3F16A446 for ; Wed, 2 Aug 2017 22:30:03 +0200 (CEST) Received: (qmail 24673 invoked by uid 500); 2 Aug 2017 20:30: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 24662 invoked by uid 99); 2 Aug 2017 20:30:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Aug 2017 20:30:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5BC641A1D0C for ; Wed, 2 Aug 2017 20:30:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id VsRdHriDFyCV for ; Wed, 2 Aug 2017 20:30: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 E9AA75F56A for ; Wed, 2 Aug 2017 20:30: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 86096E012F for ; Wed, 2 Aug 2017 20:30: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 3C91A2464A for ; Wed, 2 Aug 2017 20:30:00 +0000 (UTC) Date: Wed, 2 Aug 2017 20:30:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-4051) Prevent out-of-order updates for mutable index updates MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 02 Aug 2017 20:30:04 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-4051: ---------------------------------- Attachment: PHOENIX-4051_v3.patch Can you give this patch a try, [~mujtabachohan]? Let me know if you need an 0.98 version of the patch. > Prevent out-of-order updates for mutable index updates > ------------------------------------------------------ > > Key: PHOENIX-4051 > URL: https://issues.apache.org/jira/browse/PHOENIX-4051 > Project: Phoenix > Issue Type: Bug > Reporter: James Taylor > Assignee: James Taylor > Attachments: PHOENIX-4051_v1.patch, PHOENIX-4051_v2.patch, PHOENIX-4051_v3.patch > > > Out-of-order processing of data rows during index maintenance causes mutable indexes to become out of sync with regard to the data table. Here's a simple example to illustrate the issue: > # Assume table T(K,V) and index X(V,K). > # Upsert T(A, 1) at t10. Index updates: Put X(1,A) at t10. > # Upsert T(A, 3) at t30. Index updates: Delete X(1,A) at t29, Put X(3,A) at t30. > # Upsert T(A,2) at t20. Index updates: Delete X(1,A) at t19, Put X(2,A) at t20, Delete X(2,A) at t29 > Ideally, we'd want to remove the Delete X(1,A) at t29 since this isn't correct in terms of timeline consistency, but we can't do that with HBase without support for deleting/undoing Delete markers. > The above is not what is occurring. Instead, when T(A,2) comes in, the Put X(2,A) will occur at t20, but the Delete won't occur. This causes more index rows than data rows, essentially making it invalid. > A quick fix is to reset the timestamp of the data table mutations to the current time within the preBatchMutate call, when the row is exclusively locked. This skirts the issue because then timestamps won't overlap. -- This message was sent by Atlassian JIRA (v6.4.14#64029)