From dev-return-58425-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Oct 22 00:06:04 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C0939180626 for ; Tue, 22 Oct 2019 02:06:03 +0200 (CEST) Received: (qmail 48092 invoked by uid 500); 22 Oct 2019 00:06: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 47998 invoked by uid 99); 22 Oct 2019 00:06:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2019 00:06:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 29FAAE2EE7 for ; Tue, 22 Oct 2019 00:06:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 320A8780858 for ; Tue, 22 Oct 2019 00:06:00 +0000 (UTC) Date: Tue, 22 Oct 2019 00:06:00 +0000 (UTC) From: "Kadir OZDEMIR (Jira)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-5535) Index rebuilds via UngroupedAggregateRegionObserver should replay delete markers 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-5535?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kadir OZDEMIR updated PHOENIX-5535: ----------------------------------- Attachment: PHOENIX-5535.master.002.patch > Index rebuilds via UngroupedAggregateRegionObserver should replay delete = markers > -------------------------------------------------------------------------= ------- > > Key: PHOENIX-5535 > URL: https://issues.apache.org/jira/browse/PHOENIX-5535 > Project: Phoenix > Issue Type: Bug > Affects Versions: 5.0.0, 4.14.3 > Reporter: Kadir OZDEMIR > Assignee: Kadir OZDEMIR > Priority: Blocker > Fix For: 4.15.0, 5.1.0 > > Attachments: PHOENIX-5535.master.001.patch, PHOENIX-5535.master.0= 02.patch > > Time Spent: 1h 10m > Remaining Estimate: 0h > > Currently index rebuilds for global index tables are done on the server s= ide. Phoenix client generates an aggregate plan using=C2=A0ServerBuildIndex= Compiler to scan every data table row on the server side . This complier se= ts the scan attributes so that the row mutations that are scanned by Ungrou= pedRegionObserver are then replayed on the data table so that index table r= ows are rebuilt. During this replay, data table row updates are skipped and= only index table row are updated. > Phoenix allows column entries to have null values. Null values are repres= ented by HBase column delete marker. This means that index rebuild must rep= lay these delete markers along with put mutations. In order to do that=C2= =A0ServerBuildIndexCompiler should use raw scans but currently it does use = regular scans. This leads incorrect index rebuilds when null values are use= d. > A simple test where a data table with one global index with a covered col= umn that can take null value is sufficient to reproduce this problem. > # Create a data table with columns=C2=A0 a,=C2=A0 b, and c where a is th= e primary key and c can have null value > # Write one row with not null values > # Overwrite the covered column with null (i.e., set it to null)=C2=A0 > # Create an index on the table where b is the secondary key and c is cov= ered column > # Rebuild the index > # Dump the index table > The index table row should have the null value for the covered column. Ho= wever, it has the not null value written at step 2.=C2=A0=C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)