hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Sharma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8291) ServerCallable should handle RegionMovedException
Date Tue, 16 Apr 2013 18:41:16 GMT

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

Varun Sharma commented on HBASE-8291:
-------------------------------------

Nicholas, I was looking at the code and here is what I think:

processBatchCallback in HConnectionManager:
1) We call locateRegion at the beginning of every retry to locate the regions
2) When an exception happens, we call updateCachedLocations which:
   a) Refreshes the entry on RegionMovedException
   b) Keeps the entry on RegionOpeningException
   c) Deletes the entry on any other exception (SocketTimeout, ConnectTimeout and NotServingRegionException)

We could follow a similar pattern IMO:
1) connect() call always calls getRegionLocation without forcing reloads (currently upon any
retry, we refresh the region location)
2) When we have an exception, we call updateCachedLocations which handles all kinds of exceptions
and modifies the cache - this automatically takes care of RegionMovedException, RegionOpeningException
and NotServingRegionException

Since we rely on updateCachedLocations to do the right thing (refresh/delete stale cached
locations) - we no longer need to do a reload in the connect() call in ServerCallable. Let
me know what you think ?

Thanks
Varun

                
> ServerCallable should handle RegionMovedException
> -------------------------------------------------
>
>                 Key: HBASE-8291
>                 URL: https://issues.apache.org/jira/browse/HBASE-8291
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.95.0
>            Reporter: Nicolas Liochon
>
> See HBASE-8285

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message