From dev-return-50569-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon Apr 2 19:10:03 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 4789D180627 for ; Mon, 2 Apr 2018 19:10:03 +0200 (CEST) Received: (qmail 60625 invoked by uid 500); 2 Apr 2018 17:10: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 60607 invoked by uid 99); 2 Apr 2018 17:10: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, 02 Apr 2018 17:10: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 CCBE6C64F7 for ; Mon, 2 Apr 2018 17:10:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, 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 JvckHlRiDpr7 for ; Mon, 2 Apr 2018 17:10: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 D61BD5F1B9 for ; Mon, 2 Apr 2018 17:10: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 6C4D7E030E for ; Mon, 2 Apr 2018 17:10: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 2B9B52560D for ; Mon, 2 Apr 2018 17:10:00 +0000 (UTC) Date: Mon, 2 Apr 2018 17:10:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4658) IllegalStateException: requestSeek cannot be called on ReversedKeyValueHeap 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-4658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16422785#comment-16422785 ] James Taylor commented on PHOENIX-4658: --------------------------------------- Thanks for following up on this, [~brfrn169]. With or without a fix for HBASE-20219, we'll still need to workaround the issue in Phoenix since we need to support existing releases of HBase. My comment there was more about fixing the root cause. Barring that, your patch there seems fine. I think we should add the hint with this JIRA since this change is the entire reason we need the new hint. Adding the hint is trivial. Here's what you'd need to do: - Add new FORWARD_SCAN enum to HintNode. - Make this change in OrderByCompiler.compile(): {code} // If we're ordering by the order returned by the scan, we don't need an order by if (isInRowKeyOrder && tracker.isOrderPreserving()) { if (tracker.isReverse() && !statement.getHint().hasHint(Hint.FORWARD_SCAN)) { // Don't use reverse scan if: // 1) we're using a skip scan, as our skip scan doesn't support this yet. // 2) we have the FORWARD_SCAN hint set to choose to keep loading of column // families on demand versus doing a reverse scan // REV_ROW_KEY_ORDER_BY scan would not take effect for a projected table, so don't return it for such table types. if (context.getConnection().getQueryServices().getProps().getBoolean(QueryServices.USE_REVERSE_SCAN_ATTRIB, QueryServicesOptions.DEFAULT_USE_REVERSE_SCAN) && !context.getScanRanges().useSkipScanFilter() && context.getCurrentTable().getTable().getType() != PTableType.PROJECTED && context.getCurrentTable().getTable().getType() != PTableType.SUBQUERY) { return OrderBy.REV_ROW_KEY_ORDER_BY; } } else { return OrderBy.FWD_ROW_KEY_ORDER_BY; } } {code} > IllegalStateException: requestSeek cannot be called on ReversedKeyValueHeap > --------------------------------------------------------------------------- > > Key: PHOENIX-4658 > URL: https://issues.apache.org/jira/browse/PHOENIX-4658 > Project: Phoenix > Issue Type: Bug > Reporter: Toshihiro Suzuki > Assignee: Toshihiro Suzuki > Priority: Major > Fix For: 4.14.0 > > Attachments: PHOENIX-4658.patch, PHOENIX-4658.patch, PHOENIX-4658.patch > > > Steps to reproduce are as follows: > 1. Create a table with multiple column families (default column family and "FAM") > {code} > CREATE TABLE TBL ( > COL1 VARCHAR NOT NULL, > COL2 VARCHAR NOT NULL, > COL3 VARCHAR, > FAM.COL4 VARCHAR, > CONSTRAINT TRADE_EVENT_PK PRIMARY KEY (COL1, COL2) > ) > {code} > 2. Upsert a row > {code} > UPSERT INTO TBL (COL1, COL2) values ('AAA', 'BBB') > {code} > 3. Query with DESC for the table > {code} > SELECT * FROM TBL WHERE COL2 = 'BBB' ORDER BY COL1 DESC > {code} > By following the above steps, we face the following exception. > {code} > java.util.concurrent.ExecutionException: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: TBL,,1521251842845.153781990c0fb4bc34e3f2c721a6f415.: requestSeek cannot be called on ReversedKeyValueHeap > at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:96) > at org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:62) > at org.apache.phoenix.iterate.RegionScannerFactory$1.nextRaw(RegionScannerFactory.java:212) > at org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:82) > at org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:82) > at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.nextRaw(BaseScannerRegionObserver.java:294) > at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2808) > at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3045) > at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36613) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2352) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) > at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:297) > at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:277) > Caused by: java.lang.IllegalStateException: requestSeek cannot be called on ReversedKeyValueHeap > at org.apache.hadoop.hbase.regionserver.ReversedKeyValueHeap.requestSeek(ReversedKeyValueHeap.java:65) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.joinedHeapMayHaveData(HRegion.java:6485) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextInternal(HRegion.java:6412) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:6126) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:6112) > at org.apache.phoenix.iterate.RegionScannerFactory$1.nextRaw(RegionScannerFactory.java:175) > ... 10 more > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)