From issues-return-4666-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Fri Feb 15 00:14:05 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 65E57180763 for ; Fri, 15 Feb 2019 01:14:04 +0100 (CET) Received: (qmail 95654 invoked by uid 500); 15 Feb 2019 00:14:03 -0000 Mailing-List: contact issues-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 issues@phoenix.apache.org Received: (qmail 95645 invoked by uid 99); 15 Feb 2019 00:14:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Feb 2019 00:14:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2289BC0727 for ; Fri, 15 Feb 2019 00:14:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.222 X-Spam-Level: X-Spam-Status: No, score=-109.222 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, PLING_QUERY=0.279, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id zjT7V-q5Inrv for ; Fri, 15 Feb 2019 00:14: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 13DB85F244 for ; Fri, 15 Feb 2019 00:14: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 6E4F5E2792 for ; Fri, 15 Feb 2019 00:14: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 30297244D0 for ; Fri, 15 Feb 2019 00:14:00 +0000 (UTC) Date: Fri, 15 Feb 2019 00:14:00 +0000 (UTC) From: "Xinyi Yan (JIRA)" To: issues@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (PHOENIX-5068) Autocommit off is not working as expected might be a bug!? 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-5068?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 768794#comment-16768794 ]=20 Xinyi Yan edited comment on PHOENIX-5068 at 2/15/19 12:13 AM: -------------------------------------------------------------- {code:java} 0: jdbc:phoenix:localhost:2181:/hbase> CREATE TABLE F1 (A VARCHAR PRIMARY K= EY); No rows affected (1.231 seconds) 0: jdbc:phoenix:localhost:2181:/hbase> !autocommit off Autocommit status: false 0: jdbc:phoenix:localhost:2181:/hbase> UPSERT INTO F1 SELECT * FROM F2 LIMI= T 101; 201 rows affected (0.006 seconds) 0: jdbc:phoenix:localhost:2181:/hbase> !autocommit on Autocommit status: true 0: jdbc:phoenix:localhost:2181:/hbase> SELECT COUNT(*) FROM F1; +-----------+ | COUNT(1) | +-----------+ | 101 | +-----------+ 1 row selected (0.018 seconds) {code} [~tdsilva]=C2=A0The UPSERT SELECT behavior is correct, but the number of ro= ws affected number display=C2=A0here is wrong.=C2=A0 Should we fix this? was (Author: yanxinyi): {code:java} 0: jdbc:phoenix:localhost:2181:/hbase> CREATE TABLE F1 (A VARCHAR PRIMARY K= EY); No rows affected (1.231 seconds) 0: jdbc:phoenix:localhost:2181:/hbase> !autocommit off Autocommit status: false 0: jdbc:phoenix:localhost:2181:/hbase> UPSERT INTO F1 SELECT * FROM F2 LIMI= T 101; 201 rows affected (0.006 seconds) 0: jdbc:phoenix:localhost:2181:/hbase> !autocommit on Autocommit status: true 0: jdbc:phoenix:localhost:2181:/hbase> SELECT COUNT(*) FROM F1; +-----------+ | COUNT(1) | +-----------+ | 101 | +-----------+ 1 row selected (0.018 seconds) {code} [~tdsilva]=C2=A0The UPSERT SELECT behavior is correct, but the number of ro= ws affected number is wrong.=C2=A0 Should we fix this? > Autocommit off is not working as expected might be a bug!? > ---------------------------------------------------------- > > Key: PHOENIX-5068 > URL: https://issues.apache.org/jira/browse/PHOENIX-5068 > Project: Phoenix > Issue Type: Bug > Reporter: Amarnath Ramamoorthi > Assignee: Xinyi Yan > Priority: Minor > Attachments: test_foo_data.sql > > > Autocommit off is working strange might be a bug!? > Here is what we found when using autocommit off. > A table has only 2 int columns and both set as primary key, containing 10= 0 rows in total. > On *"autocommit off"* when we try to upsert values in to same table, it s= ays 200 rows affected. > Works fine when we run the same Upsert command but with less than 100 row= s using WHERE command as you can see below. > There is something wrong with auto commit off with >=3D 100 rows upsert`s= . > {code:java} > 0: jdbc:phoenix:XXYYZZ> select count(*) from "FOO".DEMO; > +-----------+ > | COUNT(1) | > +-----------+ > | 100 | > +-----------+ > 1 row selected (0.025 seconds) > 0: jdbc:phoenix:XXYYZZ> SELECT * FROM "FOO".DEMO WHERE "id_x"=3D9741; > +--------+-----------+ > | id_x | id_y | > +--------+-----------+ > | 9741 | 63423770 | > +--------+-----------+ > 1 row selected (0.04 seconds) > 0: jdbc:phoenix:XXYYZZ> !autocommit off > Autocommit status: false > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".DEMO; > 200 rows affected (0.023 seconds) > 0: jdbc:phoenix:XXYYZZ>=20 > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".DEMO W= HERE "id_x"=3D9741; > 1 row affected (0.014 seconds) > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".DEMO W= HERE "id_x"!=3D9741; > 99 rows affected (0.045 seconds) > 0: jdbc:phoenix:XXYYZZ> > 0: jdbc:phoenix:XXYYZZ> !autocommit on > Autocommit status: true > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".DEMO; > 100 rows affected (0.065 seconds) > {code} > Tested once again, but now select from different table > {code:java} > 0: jdbc:phoenix:XXYYZZ> !autocommit off > Autocommit status: false > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".TEST l= imit 100; > 200 rows affected (0.052 seconds) > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".TEST l= imit 99; > 99 rows affected (0.029 seconds) > 0: jdbc:phoenix:XXYYZZ> UPSERT INTO "FOO".DEMO SELECT * FROM "FOO".TEST l= imit 500; > 1,000 rows affected (0.041 seconds) > {code} > Still the same, It shows the rows affected is 1,000 even though we have i= t limited to 500.=C2=A0It keeps doubling up. > Would be really helpful=C2=A0if someone could=C2=A0help on this please. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)