From dev-return-58628-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Tue Nov 12 00:30:03 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 B3927180629 for ; Tue, 12 Nov 2019 01:30:02 +0100 (CET) Received: (qmail 95490 invoked by uid 500); 12 Nov 2019 00: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 95477 invoked by uid 99); 12 Nov 2019 00:30:01 -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, 12 Nov 2019 00:30:01 +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 CE38FE2F7F for ; Tue, 12 Nov 2019 00:30:00 +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 1632A780310 for ; Tue, 12 Nov 2019 00:30:00 +0000 (UTC) Date: Tue, 12 Nov 2019 00:30:00 +0000 (UTC) From: "Chinmay Kulkarni (Jira)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-5546) TASK_TS being set as HConstants.LATEST_TIMESTAMP in SYSTEM.TASK table 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/PHOENIX-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chinmay Kulkarni updated PHOENIX-5546: -------------------------------------- Attachment: sqlline.png > TASK_TS being set as HConstants.LATEST_TIMESTAMP in SYSTEM.TASK table > --------------------------------------------------------------------- > > Key: PHOENIX-5546 > URL: https://issues.apache.org/jira/browse/PHOENIX-5546 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.15.0, 5.1.0 > Reporter: Chinmay Kulkarni > Assignee: Chinmay Kulkarni > Priority: Blocker > Fix For: 4.15.0, 5.1.0 > > Attachments: MaxTs-repro-test.txt, completed.png, created.png, sqlline.png > > > When we upsert DropChildViewTask entries into SYSTEM.TASK, the TASK_TS field which is designated as a ROW_TIMESTAMP always gets the HConstants.LATEST_TIMESTAMP value instead of the current server-side wall clock time. > *The main side-effect of this bug is, subsequent creation and dropping of the same base table will not upsert new DropChildViewTasks into the SYSTEM.TASK table.* > Steps to reproduce: > 1) Start HBase server with 4.15.0 Phoenix > 2) Create a base table and a view on top of that base table: > {code:sql} > CREATE TABLE IF NOT EXISTS Z_BASE_TABLE (ID INTEGER NOT NULL PRIMARY KEY, HOST VARCHAR(10), FLAG BOOLEAN); > CREATE VIEW Z_VIEW1 (col1 INTEGER, col2 INTEGER, col3 INTEGER, col4 INTEGER, col5 INTEGER) AS SELECT * FROM Z_BASE_TABLE WHERE ID>10; > {code} > 3) Drop the base table with the cascade option: > {code:sql} > DROP TABLE Z_BASE_TABLE CASCADE; > {code} > 4) Observe the SYSTEM.TASK table: > {code:sql} > SELECT TASK_TYPE, TASK_TS, TABLE_NAME, TASK_STATUS FROM SYSTEM.TASK; > {code} > --> gives the following: > {code:sql} > +------------+-------------------------------+---------------+--------------+ > | TASK_TYPE | TASK_TS | TABLE_NAME | TASK_STATUS | > +------------+-------------------------------+---------------+--------------+ > | 1 | 292278994-08-16 23:12:55.807 | Z_BASE_TABLE | COMPLETED | > +------------+-------------------------------+---------------+--------------+ > {code} > That timestamp is basically HConstants.LATEST_TIMESTAMP. > 5) Recreate the base table and view, then drop the base table, then observe SYSTEM.TASK again (Steps 2 to 4) and no new DropChildViewTask is added for the base table created the second time > {code:sql} > +------------+-------------------------------+---------------+--------------+ > | TASK_TYPE | TASK_TS | TABLE_NAME | TASK_STATUS | > +------------+-------------------------------+---------------+--------------+ > | 1 | 292278994-08-16 23:12:55.807 | Z_BASE_TABLE | COMPLETED | > +------------+-------------------------------+---------------+--------------+ > {code} > Thus, the views are still there and this seems to be an issue with the ROW_TIMESTAMP being assigned HConstants.LATEST_TIMESTAMP. -- This message was sent by Atlassian Jira (v8.3.4#803005)