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

Rajeshbabu Chintaguntla commented on PHOENIX-1336:
--------------------------------------------------

Thanks [~xwxingyi] for the details. They help to find the reason for this issue.
The reason for the exception is when we get row from cell we are getting row 
with out region start key(which we intentionally striping out from server side 
for local indexes) so the last key part is just starts with indexed column 
values which will not be in the range of region boundary.  This can avoided by 
having delegate cell holds actual cell as delegate so when ever actual row(like 
lastkey) required we can get from delegate. I will make a patch and submit. 

> 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
>    Affects Versions: 4.1
>         Environment: jdk1.6 linux
>            Reporter: jelly Chen
>            Assignee: rajeshbabu
>         Attachments: exception.txt, hbase-cmf-hbase-MASTER-hdh138.log.out, 
> hbase-cmf-hbase-REGIONSERVER-hdh138.log.out, 
> hbase-cmf-hbase-REGIONSERVER-hdh139.log.out, 
> hbase-cmf-hbase-REGIONSERVER-hdh140.log.out, regioninfos.txt
>
>
> 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)

Reply via email to