You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Yiqun Lin (JIRA)" <ji...@apache.org> on 2017/10/18 10:15:00 UTC

[jira] [Comment Edited] (HDFS-12675) Ozone: TestLeaseManager#testLeaseCallbackWithMultipleLeases fails

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

Yiqun Lin edited comment on HDFS-12675 at 10/18/17 10:14 AM:
-------------------------------------------------------------

I just debugged the test. The root cause of this is that {{Thread#sleep}} in {{LeaseMonitor#run}} slowly ran than sleep operation executed in test.  During the test, I found  {{LeaseMonitor#run}} would run one or two empty iterations then prepare sleep for release lease4 and lease5. But here we only increase a little delay time for desired sleep time. So there is a chance this delay is smaller than empty-iterations running time.
One simple way is to increase the sleep in test to ensure the lease is released in loop.


was (Author: linyiqun):
I am thinking one corner case leading for this:

# {{LeaseNotFoundException}} or {{LeaseExpiredException}} is thrown in loop {{for (T resource : activeLeases.keySet()) {}}.
# Then the {{sleepTime}} used in {{while}} loop doesn't get a correct value, then program sleep for {{Long.MAX_VALUE}} time.Remaining leases cannot be released.

> Ozone: TestLeaseManager#testLeaseCallbackWithMultipleLeases fails 
> ------------------------------------------------------------------
>
>                 Key: HDFS-12675
>                 URL: https://issues.apache.org/jira/browse/HDFS-12675
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-12675-HDFS-7240.001.patch
>
>
> Caught one UT failure {{TestLeaseManager#testLeaseCallbackWithMultipleLeases}}:
> {noformat}
> jcava.lang.AssertionError: null
> 	at org.junit.Assert.fail(Assert.java:86)
> 	at org.junit.Assert.assertTrue(Assert.java:41)
> 	at org.junit.Assert.assertTrue(Assert.java:52)
> 	at org.apache.hadoop.ozone.lease.TestLeaseManager.testLeaseCallbackWithMultipleLeases(TestLeaseManager.java:293)
> {noformat}
> The reason of this error is  lease {{leaseFive}} didn't expire in test.



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

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