You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "jelly Chen (JIRA)" <ji...@apache.org> on 2014/10/10 14:02:34 UTC

[jira] [Updated] (PHOENIX-1336) Exception when select from local index:Cache of region boundaries are out of date

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

jelly Chen updated PHOENIX-1336:
--------------------------------
    Description: 
when i select a colomn which indexed by local index(so local index will be used) from a primary table,
it occurs an Exception:‍
----------------------------------------------------------------------------------------------------
14/10/10 19:49:03 DEBUG iterate.ChunkedResultIterator: Get first chunked result iterator over LOCAL_1000W_P with {"timeRange":[0,1412941671047],"batch":-1,"startRow":"\\x80\\x00\\x00\\x00\\x13/(M\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\xA5\\x00\\x0D","stopRow":"\\x80\\x00\\x00\\x00\\x13/(M\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\xA5\\x00\\x0E","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":100}
14/10/10 19:49:03 DEBUG iterate.ChunkedResultIterator: Get next chunked result iterator over LOCAL_1000W_P with {"timeRange":[0,1412941671047],"batch":-1,"startRow":"\\x00\\x0DWJ11VS888\\x00\\x80\\x00\\x00\\x00\\x12\\xDB3\\xB4\\x80\\x00\\x00\\x00\\x00\\x00\\x00^","stopRow":"\\x80\\x00\\x00\\x00\\x12\\xD8\\x1B\\xF5\\x00\\x0E","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":100}
org.apache.phoenix.schema.StaleRegionBoundaryCacheException: ERROR 1108 (XCL07): Cache of region boundaries are out of date.
	at org.apache.phoenix.exception.SQLExceptionCode$13.newException(SQLExceptionCode.java:271)
	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
	at org.apache.phoenix.util.ServerUtil.parseRemoteException(ServerUtil.java:124)
	at org.apache.phoenix.util.ServerUtil.parseServerExceptionOrNull(ServerUtil.java:108)
	at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:97)
	at org.apache.phoenix.iterate.TableResultIterator.<init>(TableResultIterator.java:57)
	at org.apache.phoenix.iterate.ChunkedResultIterator.getResultIterator(ChunkedResultIterator.java:118)
	at org.apache.phoenix.iterate.ChunkedResultIterator.peek(ChunkedResultIterator.java:94)
	at org.apache.phoenix.iterate.MergeSortResultIterator.minIterator(MergeSortResultIterator.java:68)
	at org.apache.phoenix.iterate.MergeSortResultIterator.next(MergeSortResultIterator.java:90)
	at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:732)
	at com.hikvision.traffic.sql.test.TestSQL.testPhoenix(TestSQL.java:77)

----------------------------------------------------------------------------------------------------	
the related query is "select plateinfo from v_pass_1000w".
The exception show cache of region boundaries are out of date,but haven‘t region changed the whole process.

the same excepton occcurs when direct to query from index "select * from LOCAL_1000W_P".

The related scheme as follow:
CREATE TABLE IF NOT EXISTS V_PASS_1000W (
     VEHICLELSH BIGINT NOT NULL,
     CROSSLSH BIGINT NOT NULL,
     DEVICEINDEX VARCHAR(32),
     VEHICLEINDEX VARCHAR(7),
     DIRECTINDEX VARCHAR(4),
     PLATEINFO VARCHAR(15),
     PLATETYPE BIGINT,
     PASSTIME TIMESTAMP,
     /*PASSTIME VARCHAR(50),*/
     VEHICLESPEED BIGINT,
     VEHICLELEN BIGINT,
     PLATECOLOR BIGINT,
     PICFEATURE VARCHAR(64),
     PICFULLVIEW VARCHAR(64),
     PICFTPPATH VARCHAR(100),
     DOWNLOADFLAG BIGINT,
     PICLOCALPATH VARCHAR(100),
     DRIVEWAYNUMBER BIGINT,
     VEHICLETYPE BIGINT,
     VEHICLECOLOR BIGINT,
     VEHICLESTATE BIGINT,
     VEHCOLORDEPTH BIGINT,
     RECORDID VARCHAR(31),
     SENDFLAG BIGINT,
     VRPLSH BIGINT,
     CREATEDATE TIMESTAMP
     /*CREATEDATE VARCHAR(50)*/
     CONSTRAINT PK PRIMARY KEY (VEHICLELSH,CROSSLSH)
);
> select * from LOCAL_1000W_P limit 2;
+-------------+-------------+------------+
| 0:PLATEINFO | :VEHICLELSH | :CROSSLSH  |
+-------------+-------------+------------+
| WJ0000009   | 323085883   | 117        |
| WJ0000021   | 320798157   | 181        |
+-------------+-------------+------------+



  was:
when i select a colomn which indexed by local index(so local index will be used) from a primary table,
it occurs an Exception:‍
----------------------------------------------------------------------------------------------------
14/10/10 19:49:03 DEBUG iterate.ChunkedResultIterator: Get first chunked result iterator over LOCAL_1000W_P with {"timeRange":[0,1412941671047],"batch":-1,"startRow":"\\x80\\x00\\x00\\x00\\x13/(M\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\xA5\\x00\\x0D","stopRow":"\\x80\\x00\\x00\\x00\\x13/(M\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\xA5\\x00\\x0E","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":100}
14/10/10 19:49:03 DEBUG iterate.ChunkedResultIterator: Get next chunked result iterator over LOCAL_1000W_P with {"timeRange":[0,1412941671047],"batch":-1,"startRow":"\\x00\\x0DWJ11VS888\\x00\\x80\\x00\\x00\\x00\\x12\\xDB3\\xB4\\x80\\x00\\x00\\x00\\x00\\x00\\x00^","stopRow":"\\x80\\x00\\x00\\x00\\x12\\xD8\\x1B\\xF5\\x00\\x0E","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":100}
org.apache.phoenix.schema.StaleRegionBoundaryCacheException: ERROR 1108 (XCL07): Cache of region boundaries are out of date.
	at org.apache.phoenix.exception.SQLExceptionCode$13.newException(SQLExceptionCode.java:271)
	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
	at org.apache.phoenix.util.ServerUtil.parseRemoteException(ServerUtil.java:124)
	at org.apache.phoenix.util.ServerUtil.parseServerExceptionOrNull(ServerUtil.java:108)
	at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:97)
	at org.apache.phoenix.iterate.TableResultIterator.<init>(TableResultIterator.java:57)
	at org.apache.phoenix.iterate.ChunkedResultIterator.getResultIterator(ChunkedResultIterator.java:118)
	at org.apache.phoenix.iterate.ChunkedResultIterator.peek(ChunkedResultIterator.java:94)
	at org.apache.phoenix.iterate.MergeSortResultIterator.minIterator(MergeSortResultIterator.java:68)
	at org.apache.phoenix.iterate.MergeSortResultIterator.next(MergeSortResultIterator.java:90)
	at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:732)
	at com.hikvision.traffic.sql.test.TestSQL.testPhoenix(TestSQL.java:77)

----------------------------------------------------------------------------------------------------	
the related query is "select plateinfo from v_pass_1000w".
The exception show cache of region boundaries are out of date,but haven‘t region changed the whole process.

the same excepton occcurs when direct to query from index "select count(*) from LOCAL_1000W_P".

The related scheme as follow:
CREATE TABLE IF NOT EXISTS V_PASS_1000W (
     VEHICLELSH BIGINT NOT NULL,
     CROSSLSH BIGINT NOT NULL,
     DEVICEINDEX VARCHAR(32),
     VEHICLEINDEX VARCHAR(7),
     DIRECTINDEX VARCHAR(4),
     PLATEINFO VARCHAR(15),
     PLATETYPE BIGINT,
     PASSTIME TIMESTAMP,
     /*PASSTIME VARCHAR(50),*/
     VEHICLESPEED BIGINT,
     VEHICLELEN BIGINT,
     PLATECOLOR BIGINT,
     PICFEATURE VARCHAR(64),
     PICFULLVIEW VARCHAR(64),
     PICFTPPATH VARCHAR(100),
     DOWNLOADFLAG BIGINT,
     PICLOCALPATH VARCHAR(100),
     DRIVEWAYNUMBER BIGINT,
     VEHICLETYPE BIGINT,
     VEHICLECOLOR BIGINT,
     VEHICLESTATE BIGINT,
     VEHCOLORDEPTH BIGINT,
     RECORDID VARCHAR(31),
     SENDFLAG BIGINT,
     VRPLSH BIGINT,
     CREATEDATE TIMESTAMP
     /*CREATEDATE VARCHAR(50)*/
     CONSTRAINT PK PRIMARY KEY (VEHICLELSH,CROSSLSH)
);
> select * from LOCAL_1000W_P limit 2;
+-------------+-------------+------------+
| 0:PLATEINFO | :VEHICLELSH | :CROSSLSH  |
+-------------+-------------+------------+
| WJ0000009   | 323085883   | 117        |
| WJ0000021   | 320798157   | 181        |
+-------------+-------------+------------+




> Exception when select from local index:Cache of region boundaries are out of date
> ---------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1336
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1336
>             Project: Phoenix
>          Issue Type: Bug
>         Environment: jdk1.6 linux
>            Reporter: jelly Chen
>             Fix For: 4.1
>
>
> when i select a colomn which indexed by local index(so local index will be used) from a primary table,
> it occurs an Exception:‍
> ----------------------------------------------------------------------------------------------------
> 14/10/10 19:49:03 DEBUG iterate.ChunkedResultIterator: Get first chunked result iterator over LOCAL_1000W_P with {"timeRange":[0,1412941671047],"batch":-1,"startRow":"\\x80\\x00\\x00\\x00\\x13/(M\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\xA5\\x00\\x0D","stopRow":"\\x80\\x00\\x00\\x00\\x13/(M\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\xA5\\x00\\x0E","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":100}
> 14/10/10 19:49:03 DEBUG iterate.ChunkedResultIterator: Get next chunked result iterator over LOCAL_1000W_P with {"timeRange":[0,1412941671047],"batch":-1,"startRow":"\\x00\\x0DWJ11VS888\\x00\\x80\\x00\\x00\\x00\\x12\\xDB3\\xB4\\x80\\x00\\x00\\x00\\x00\\x00\\x00^","stopRow":"\\x80\\x00\\x00\\x00\\x12\\xD8\\x1B\\xF5\\x00\\x0E","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":100}
> org.apache.phoenix.schema.StaleRegionBoundaryCacheException: ERROR 1108 (XCL07): Cache of region boundaries are out of date.
> 	at org.apache.phoenix.exception.SQLExceptionCode$13.newException(SQLExceptionCode.java:271)
> 	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
> 	at org.apache.phoenix.util.ServerUtil.parseRemoteException(ServerUtil.java:124)
> 	at org.apache.phoenix.util.ServerUtil.parseServerExceptionOrNull(ServerUtil.java:108)
> 	at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:97)
> 	at org.apache.phoenix.iterate.TableResultIterator.<init>(TableResultIterator.java:57)
> 	at org.apache.phoenix.iterate.ChunkedResultIterator.getResultIterator(ChunkedResultIterator.java:118)
> 	at org.apache.phoenix.iterate.ChunkedResultIterator.peek(ChunkedResultIterator.java:94)
> 	at org.apache.phoenix.iterate.MergeSortResultIterator.minIterator(MergeSortResultIterator.java:68)
> 	at org.apache.phoenix.iterate.MergeSortResultIterator.next(MergeSortResultIterator.java:90)
> 	at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:732)
> 	at com.hikvision.traffic.sql.test.TestSQL.testPhoenix(TestSQL.java:77)
> ----------------------------------------------------------------------------------------------------	
> the related query is "select plateinfo from v_pass_1000w".
> The exception show cache of region boundaries are out of date,but haven‘t region changed the whole process.
> the same excepton occcurs when direct to query from index "select * from LOCAL_1000W_P".
> The related scheme as follow:
> CREATE TABLE IF NOT EXISTS V_PASS_1000W (
>      VEHICLELSH BIGINT NOT NULL,
>      CROSSLSH BIGINT NOT NULL,
>      DEVICEINDEX VARCHAR(32),
>      VEHICLEINDEX VARCHAR(7),
>      DIRECTINDEX VARCHAR(4),
>      PLATEINFO VARCHAR(15),
>      PLATETYPE BIGINT,
>      PASSTIME TIMESTAMP,
>      /*PASSTIME VARCHAR(50),*/
>      VEHICLESPEED BIGINT,
>      VEHICLELEN BIGINT,
>      PLATECOLOR BIGINT,
>      PICFEATURE VARCHAR(64),
>      PICFULLVIEW VARCHAR(64),
>      PICFTPPATH VARCHAR(100),
>      DOWNLOADFLAG BIGINT,
>      PICLOCALPATH VARCHAR(100),
>      DRIVEWAYNUMBER BIGINT,
>      VEHICLETYPE BIGINT,
>      VEHICLECOLOR BIGINT,
>      VEHICLESTATE BIGINT,
>      VEHCOLORDEPTH BIGINT,
>      RECORDID VARCHAR(31),
>      SENDFLAG BIGINT,
>      VRPLSH BIGINT,
>      CREATEDATE TIMESTAMP
>      /*CREATEDATE VARCHAR(50)*/
>      CONSTRAINT PK PRIMARY KEY (VEHICLELSH,CROSSLSH)
> );
> > select * from LOCAL_1000W_P limit 2;
> +-------------+-------------+------------+
> | 0:PLATEINFO | :VEHICLELSH | :CROSSLSH  |
> +-------------+-------------+------------+
> | WJ0000009   | 323085883   | 117        |
> | WJ0000021   | 320798157   | 181        |
> +-------------+-------------+------------+



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