hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4124) ZK restarted while a region is being assigned, new active HM re-assigns it but the RS warns 'already online on this server'.
Date Sat, 27 Aug 2011 04:01:30 GMT

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

stack commented on HBASE-4124:
------------------------------

Patch is basically good but a bunch of code is repeated.  Can we refactor the repeating code
out to method and call that?

For example:

{code}
+        if (isOnDeadServer(regionInfo, deadServers)
+            && (null == data.getOrigin() || !serverManager.isServerOnline(data
+                .getOrigin()))) {
{code}

This is repeated three times.  One of the repeats does not check for null and it seems like
it should.

Also, I'd write the above as to make it more readable (just saying...)

{code}
  if (isOnDeadServer(regionInfo, deadServers) &&
    (data.getOrigin() == null ||
      !serverManager.isServerOnline(data.getOrigin()))) {
{code}

Otherwise patch makes sense.  Nice one Gao

> ZK restarted while a region is being assigned, new active HM re-assigns it but the RS
warns 'already online on this server'.
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4124
>                 URL: https://issues.apache.org/jira/browse/HBASE-4124
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>            Reporter: fulin wang
>            Assignee: gaojinchao
>             Fix For: 0.90.5
>
>         Attachments: HBASE-4124_Branch90V1_trial.patch, HBASE-4124_Branch90V2.patch,
HBASE-4124_Branch90V3.patch, HBASE-4124_Branch90V4.patch, HBASE-4124_TrunkV1.patch, log.txt
>
>   Original Estimate: 0.4h
>  Remaining Estimate: 0.4h
>
> ZK restarted while assigning a region, new active HM re-assign it but the RS warned 'already
online on this server'.
> Issue:
> The RS failed besause of 'already online on this server' and return; The HM can not receive
the message and report 'Regions in transition timed out'.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message