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

Rajeshbabu Chintaguntla commented on PHOENIX-2903:
--------------------------------------------------

There are two case NotServingRegionException will be thrown
1) When the region closed/closing(because of region split or move) while 
creating scanner. This can happen between preScannerOpen and postScannerOpen. 
We have the region closing checks in region.startRegionOperation and it will 
throw NSRE.

Code snippet from HBase.
{noformat}
    if (this.closing.get()) {
      throw new 
NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is 
closing");
    }
    lock(lock.readLock());
    if (this.closed.get()) {
      lock.readLock().unlock();
      throw new 
NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is 
closed");
    }
{noformat}

2) Second when we have stale cache of regions at hbase client and try to create 
scanners we try to contact the server with cached region then server throw NSRE 
 this hbase client itself automatically handle by getting proper region of scan 
boundaries and contact the server holding the regions. When there is a split 
first we try to contact server with parent region info but since it's not 
present we get two split regions and create scanners on it. But for child 
regions we see scan range out of boundary to region we throw Stale region 
boundary exception.



> Handle split during scan for row key ordered aggregations
> ---------------------------------------------------------
>
>                 Key: PHOENIX-2903
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2903
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: James Taylor
>         Attachments: PHOENIX-2903_v1.patch, PHOENIX-2903_wip.patch
>
>
> Currently a hole in our split detection code



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

Reply via email to