phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3505) Potential NullPointerException on close() in OrderedResultIterator
Date Wed, 14 Mar 2018 13:39:01 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398600#comment-16398600
] 

Hudson commented on PHOENIX-3505:
---------------------------------

FAILURE: Integrated in Jenkins build Phoenix-4.x-HBase-0.98 #1833 (See [https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1833/])
PHOENIX-3505 Avoid NPE on close() in OrderedResultIterator (maryannxue: rev 2c758234186e5a4d70cdc6501df19f9b0d9ec601)
* (add) phoenix-core/src/test/java/org/apache/phoenix/iterate/OrderedResultIteratorTest.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/iterate/OrderedResultIterator.java


> Potential NullPointerException on close() in OrderedResultIterator
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-3505
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3505
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Santhosh B Gowda
>            Assignee: Josh Elser
>            Priority: Major
>             Fix For: 4.10.0, 4.8.3
>
>         Attachments: PHOENIX-3505.001.patch
>
>
> I observed a NPE in executing query 10 from TPC-H over a Phoenix-4.7ish version at $dayjob.
> {noformat}
> select
> 	c_custkey,
> 	c_name,
> 	sum(l_extendedprice*(1 - l_discount)) as revenue,
> 	c_acctbal,
> 	n_name,
> 	c_address,
> 	c_phone,
> 	c_comment
> from
> 	customer,
> 	orders,
> 	lineitem,
> 	nation
> where
> 	c_custkey = o_custkey
> 	and l_orderkey = o_orderkey
> 	and o_orderdate >= to_date('1993-07-01')
> 	and o_orderdate < to_date('1993-10-01')
> 	and l_returnflag = 'R'
> 	and c_nationkey = n_nationkey
> group by
> 	c_custkey,
> 	c_name,
> 	c_acctbal,
> 	c_phone,
> 	n_name,
> 	c_address,
> 	c_comment
> order by
> 	revenue desc
> {noformat}
> DDL are:
> {noformat}
> CREATE TABLE NATION  ( N_NATIONKEY  INTEGER NOT NULL,
>                             N_NAME       CHAR(25) NOT NULL,
>                             N_REGIONKEY  INTEGER NOT NULL,
>                             N_COMMENT    VARCHAR(152));
> CREATE TABLE CUSTOMER ( C_CUSTKEY     INTEGER NOT NULL,
>                              C_NAME        VARCHAR(25) NOT NULL,
>                              C_ADDRESS     VARCHAR(40) NOT NULL,
>                              C_NATIONKEY   INTEGER NOT NULL,
>                              C_PHONE       CHAR(15) NOT NULL,
>                              C_ACCTBAL     DECIMAL(15,2)   NOT NULL,
>                              C_MKTSEGMENT  CHAR(10) NOT NULL,
>                              C_COMMENT     VARCHAR(117) NOT NULL);
> CREATE TABLE ORDERS  ( O_ORDERKEY       INTEGER NOT NULL,
>                            O_CUSTKEY        INTEGER NOT NULL,
>                            O_ORDERSTATUS    CHAR(1) NOT NULL,
>                            O_TOTALPRICE     DECIMAL(15,2) NOT NULL,
>                            O_ORDERDATE      DATE NOT NULL,
>                            O_ORDERPRIORITY  CHAR(15) NOT NULL,  
>                            O_CLERK          CHAR(15) NOT NULL, 
>                            O_SHIPPRIORITY   INTEGER NOT NULL,
>                            O_COMMENT        VARCHAR(79) NOT NULL);
> CREATE TABLE LINEITEM ( L_ORDERKEY    INTEGER NOT NULL,
>                              L_PARTKEY     INTEGER NOT NULL,
>                              L_SUPPKEY     INTEGER NOT NULL,
>                              L_LINENUMBER  INTEGER NOT NULL,
>                              L_QUANTITY    DECIMAL(15,2) NOT NULL,
>                              L_EXTENDEDPRICE  DECIMAL(15,2) NOT NULL,
>                              L_DISCOUNT    DECIMAL(15,2) NOT NULL,
>                              L_TAX         DECIMAL(15,2) NOT NULL,
>                              L_RETURNFLAG  CHAR(1) NOT NULL,
>                              L_LINESTATUS  CHAR(1) NOT NULL,
>                              L_SHIPDATE    DATE NOT NULL,
>                              L_COMMITDATE  DATE NOT NULL,
>                              L_RECEIPTDATE DATE NOT NULL,
>                              L_SHIPINSTRUCT CHAR(25) NOT NULL,
>                              L_SHIPMODE     CHAR(10) NOT NULL,
>                              L_COMMENT VARCHAR(44) NOT NULL);
> {noformat}
> We ultimately got a NullPointerException trying to close the PhoenixStatement down in
OrderedResultIterator. The only execution path I can come up with is that the Iterator was
constructor but {{next()}} or {{peek()}} were never called (for whatever reason). Calling
{{close()}} at this point would result in an NPE being thrown.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message