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

Ted Yu commented on HBASE-9098:
-------------------------------

{code}
-  // when a region is in recovering state, it can only accept writes not reads
-  private volatile boolean recovering = false;
{code}
Nice simplification above.
{code}
-  public void prepareLogReplay(Set<ServerName> serverNames) throws IOException 
{
+  public void prepareLogReplay(ServerName serverName, List<HRegionInfo> 
regions) throws IOException {
{code}
There is conversion later in the patch:
{code}
+      for(HRegionInfo tmpRegionInfo : regions) {
+        regionSet.add(tmpRegionInfo);
{code}
Why not passing Set<HRegionInfo> as parameter ?
{code}
+      // verify current region is indeed in recovering state
+      try {
+        if (SplitLogManager.isRegionMarkedRecoveringInZK(watcher, 
loc.getRegionInfo()
+            .getEncodedName()) == false) {
{code}
The comment seems to be different from the check above.
                
> During recovery use ZK as the source of truth for region state 
> ---------------------------------------------------------------
>
>                 Key: HBASE-9098
>                 URL: https://issues.apache.org/jira/browse/HBASE-9098
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.95.0
>            Reporter: Devaraj Das
>            Assignee: Jeffrey Zhong
>            Priority: Blocker
>             Fix For: 0.95.2
>
>         Attachments: hbase-9098.patch
>
>
> In HLogSplitter:locateRegionAndRefreshLastFlushedSequenceId(HConnection, 
> byte[], byte[], String), we talk to the replayee regionserver to figure out 
> whether a region is in recovery or not. We should look at ZK only for this 
> piece of information (since that is the source of truth for recovery 
> otherwise).

--
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

Reply via email to