[ 
https://issues.apache.org/jira/browse/PHOENIX-2613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-2613:
------------------------------
    Description: 
In pheonix 4.6,any column of multi-part primary key can be null.If a table has 
one row which has a column of multi-part primary key is null, when I do a 
query,the Skip Scan may cause RegionServer scan indefinite loop,just like the 
following unit test:

@Test
public void testNullInfiniteLoop() throws Exception
{
        this.jdbcTemplate.update("drop table if exists NULL_TEST ");  \r\n
                
        this.jdbcTemplate.update(
          "create table NULL_TEST"+
          "("+
          "CREATETIME VARCHAR,"+
          "ACCOUNTID VARCHAR,"+
          "SERVICENAME VARCHAR,"+
          "SPAN.APPID VARCHAR,"+
          "CONSTRAINT pk PRIMARY
KEY(CREATETIME,ACCOUNTID,SERVICENAME)"+
          ")");
                
        this.jdbcTemplate.update("upsert into 
NULL_TEST(CREATETIME,SERVICENAME,SPAN.APPID) 
values('20160116141006','servlet','android')");
                
        this.jdbcTemplate.update("upsert into 
NULL_TEST(CREATETIME,ACCOUNTID,SERVICENAME,SPAN.APPID) 
values('20160116151006','2404787','jdbc','ios')");
                
       this.jdbcTemplate.queryForList("select * from NULL_TEST where 
CREATETIME>='20160116121006' and  CREATETIME<='20160116181006' and 
ACCOUNTID='2404787'");
                
}





  was:
In pheonix 4.6,any column of multi-part primary key can be null.If a table has 
one row which has a column of multi-part primary key is null, when I do a 
query,the Skip Scan may cause RegionServer scan indefinite loop,just like the 
following unit test:

@Test
public void testNullInfiniteLoop() throws Exception
{
        this.jdbcTemplate.update("drop table if exists NULL_TEST ");
                
        this.jdbcTemplate.update(
          "create table NULL_TEST"+
          "("+
          "CREATETIME VARCHAR,"+
          "ACCOUNTID VARCHAR,"+
          "SERVICENAME VARCHAR,"+
          "SPAN.APPID VARCHAR,"+
          "CONSTRAINT pk PRIMARY
KEY(CREATETIME,ACCOUNTID,SERVICENAME)"+
          ")");
                
        this.jdbcTemplate.update("upsert into 
NULL_TEST(CREATETIME,SERVICENAME,SPAN.APPID) 
values('20160116141006','servlet','android')");
                
        this.jdbcTemplate.update("upsert into 
NULL_TEST(CREATETIME,ACCOUNTID,SERVICENAME,SPAN.APPID) 
values('20160116151006','2404787','jdbc','ios')");
                
       this.jdbcTemplate.queryForList("select * from NULL_TEST where 
CREATETIME>='20160116121006' and  CREATETIME<='20160116181006' and 
ACCOUNTID='2404787'");
                
}






> if any column of multi-part primary key is null, the Skip Scan may cause 
> RegionServer scan indefinite loop
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2613
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2613
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.6.0
>         Environment: HBase 0.98.6-cdh5.3.2, Phoenix 4.6.0-HBase-0.98
>            Reporter: chenglei
>
> In pheonix 4.6,any column of multi-part primary key can be null.If a table 
> has one row which has a column of multi-part primary key is null, when I do a 
> query,the Skip Scan may cause RegionServer scan indefinite loop,just like the 
> following unit test:
> @Test
> public void testNullInfiniteLoop() throws Exception
> {
>       this.jdbcTemplate.update("drop table if exists NULL_TEST ");  \r\n
>               
>       this.jdbcTemplate.update(
>           "create table NULL_TEST"+
>           "("+
>           "CREATETIME VARCHAR,"+
>           "ACCOUNTID VARCHAR,"+
>           "SERVICENAME VARCHAR,"+
>           "SPAN.APPID VARCHAR,"+
>           "CONSTRAINT pk PRIMARY
> KEY(CREATETIME,ACCOUNTID,SERVICENAME)"+
>           ")");
>               
>       this.jdbcTemplate.update("upsert into 
> NULL_TEST(CREATETIME,SERVICENAME,SPAN.APPID) 
> values('20160116141006','servlet','android')");
>               
>         this.jdbcTemplate.update("upsert into 
> NULL_TEST(CREATETIME,ACCOUNTID,SERVICENAME,SPAN.APPID) 
> values('20160116151006','2404787','jdbc','ios')");
>               
>        this.jdbcTemplate.queryForList("select * from NULL_TEST where 
> CREATETIME>='20160116121006' and  CREATETIME<='20160116181006' and 
> ACCOUNTID='2404787'");
>               
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to