hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chia-Ping Tsai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19350) TestMetaWithReplicas is flaky in branch-1
Date Mon, 27 Nov 2017 18:29:00 GMT

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

Chia-Ping Tsai commented on HBASE-19350:
----------------------------------------

bq. Just one question: why is this test flaky? I was looking into this test before and I was
not able to reproduce the failure locally. Could be that the server is still doing some region
assignment?
yep. It is a time-based test.

> TestMetaWithReplicas is flaky in branch-1
> -----------------------------------------
>
>                 Key: HBASE-19350
>                 URL: https://issues.apache.org/jira/browse/HBASE-19350
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>             Fix For: 1.4.0, 2.0.0-beta-1
>
>
> If the size of RegionsInTransition is zero, the list passed to {{ClusterStatus}} will
be null.
> {code:title=ClusterStatus.java}
>     Set<RegionState> rit = null;
>     if (!proto.getRegionsInTransitionList().isEmpty()) {
>       rit = new HashSet<RegionState>(proto.getRegionsInTransitionList().size());
>       for (RegionInTransition region : proto.getRegionsInTransitionList()) {
>         RegionState value = RegionState.convert(region.getRegionState());
>         rit.add(value);
>       }
>     }
> {code}
> It causes NPE if someone try to do the for-each work. The HBaseFsckRepair is a real-life
example.
> {code:title=HBaseFsckRepair.java}
>         for (RegionState rs: admin.getClusterStatus().getRegionsInTransition()) {
>           if (rs.getRegion().equals(region)) {
>             inTransition = true;
>             break;
>           }
>         }
> {code}
> branch-2/master don't have this issue as the list of RegionsInTransition passed to {{ClusterStatus}}
never be null.
> {code:title=ProtobufUtil.java}
>     List<RegionState> rit =
>       new ArrayList<>(proto.getRegionsInTransitionList().size());
>     for (RegionInTransition region : proto.getRegionsInTransitionList()) {
>       RegionState value = RegionState.convert(region.getRegionState());
>       rit.add(value);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message