hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haibo Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6334) TestRMFailover#testAutomaticFailover always passes even RM didn't transition to Standby.
Date Wed, 15 Mar 2017 20:10:43 GMT

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

Haibo Chen commented on YARN-6334:
----------------------------------

Thanks for the update, [~yufeigu]! One question that I was missing is, do you think sleep(1)
is long enough? If we have hit this bug quite a lot, it probably means we are not sleeping
long enough. An internal of 1 ms seems too short to me. Maybe we should try sleep(100)?

> TestRMFailover#testAutomaticFailover always passes even RM didn't transition to Standby.
> ----------------------------------------------------------------------------------------
>
>                 Key: YARN-6334
>                 URL: https://issues.apache.org/jira/browse/YARN-6334
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: YARN-6334.001.patch, YARN-6334.002.patch, YARN-6334.003.patch
>
>
> Due to a bug in {{while}} loop. 
> {code}
>     int maxWaitingAttempts = 2000;
>     while (maxWaitingAttempts-- > 0 ) {
>       if (rm.getRMContext().getHAServiceState() == HAServiceState.STANDBY) {
>         break;
>       }
>       Thread.sleep(1);
>     }
>     Assert.assertFalse("RM didn't transition to Standby ",
>         maxWaitingAttempts == 0);
> {code}
> maxWaitingAttempts is -1 if RM didn't transition to Standby. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message