From dev-return-51906-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon May 21 22:24:06 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 99DD2180679 for ; Mon, 21 May 2018 22:24:05 +0200 (CEST) Received: (qmail 33589 invoked by uid 500); 21 May 2018 20:24: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 33578 invoked by uid 99); 21 May 2018 20:24:02 -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; Mon, 21 May 2018 20:24:02 +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 746E6C61B7 for ; Mon, 21 May 2018 20:24:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, 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 LQFKkznxvY8U for ; Mon, 21 May 2018 20:24: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 7B79E5F356 for ; Mon, 21 May 2018 20:24: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 DD719E0A4B for ; Mon, 21 May 2018 20:24: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 4DCE2217A1 for ; Mon, 21 May 2018 20:24:00 +0000 (UTC) Date: Mon, 21 May 2018 20:24:00 +0000 (UTC) From: "Hudson (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4692) ArrayIndexOutOfBoundsException in ScanRanges.intersectScan 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-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483002#comment-16483002 ] Hudson commented on PHOENIX-4692: --------------------------------- FAILURE: Integrated in Jenkins build Phoenix-4.x-HBase-0.98 #1900 (See [https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1900/]) PHOENIX-4692 ArrayIndexOutOfBoundsException in ScanRanges.intersectScan (maryannxue: rev 097881c3fad5bb746d2a58ae3f90d52d40121cfc) * (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanQueryIT.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java * (edit) phoenix-core/src/main/java/org/apache/phoenix/execute/HashJoinPlan.java > ArrayIndexOutOfBoundsException in ScanRanges.intersectScan > ---------------------------------------------------------- > > Key: PHOENIX-4692 > URL: https://issues.apache.org/jira/browse/PHOENIX-4692 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.14.0 > Reporter: Sergey Soldatov > Assignee: James Taylor > Priority: Major > Fix For: 4.14.0, 5.0.0 > > Attachments: PHOENIX-4692-IT.patch, PHOENIX-4692_v1.patch, PHOENIX-4692_v2.patch > > > ScanRanges.intersectScan may fail with AIOOBE if a salted table is used. > {noformat} > java.lang.ArrayIndexOutOfBoundsException: 1 > at org.apache.phoenix.util.ScanUtil.getKey(ScanUtil.java:333) > at org.apache.phoenix.util.ScanUtil.getMinKey(ScanUtil.java:317) > at org.apache.phoenix.compile.ScanRanges.intersectScan(ScanRanges.java:371) > at org.apache.phoenix.iterate.BaseResultIterators.getParallelScans(BaseResultIterators.java:1074) > at org.apache.phoenix.iterate.BaseResultIterators.getParallelScans(BaseResultIterators.java:631) > at org.apache.phoenix.iterate.BaseResultIterators.(BaseResultIterators.java:501) > at org.apache.phoenix.iterate.ParallelIterators.(ParallelIterators.java:62) > at org.apache.phoenix.execute.ScanPlan.newIterator(ScanPlan.java:274) > at org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:364) > at org.apache.phoenix.execute.HashJoinPlan.iterator(HashJoinPlan.java:234) > at org.apache.phoenix.execute.DelegateQueryPlan.iterator(DelegateQueryPlan.java:144) > at org.apache.phoenix.execute.DelegateQueryPlan.iterator(DelegateQueryPlan.java:139) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:314) > at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:293) > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) > at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:292) > at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:285) > at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:1798) > {noformat} > Script to reproduce: > {noformat} > CREATE TABLE TEST (PK1 INTEGER NOT NULL, PK2 INTEGER NOT NULL, ID1 INTEGER, ID2 INTEGER CONSTRAINT PK PRIMARY KEY(PK1 , PK2))SALT_BUCKETS = 4; > upsert into test values (1,1,1,1); > upsert into test values (2,2,2,2); > upsert into test values (2,3,1,2); > create view TEST_VIEW as select * from TEST where PK1 in (1,2); > CREATE INDEX IDX_VIEW ON TEST_VIEW (ID1); > select /*+ INDEX(TEST_VIEW IDX_VIEW) */ * from TEST_VIEW where ID1 = 1 ORDER BY ID2 LIMIT 500 OFFSET 0; > {noformat} > That happens because we have a point lookup optimization which reduces RowKeySchema to a single field, while we have more than one slot due salting. > [~jamestaylor] can you please take a look? I'm not sure whether it should be fixed on the ScanUtil level or we just should not use point lookup in such cases. -- This message was sent by Atlassian JIRA (v7.6.3#76005)