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

Ayush Saxena commented on HDFS-14004:
-------------------------------------

The test only passes when the data length which is randomly selected by 
AppendTestUtil.nextInt(FILE_SIZE) is less than one block size.
 But when the data length is more and two blocks needs to be written the test 
fails since the IBR are paused and the first block gets commited but not 
complete which in turn doesn't allow the file to get completed bcoz of 
following in FSDirWriteFileOp
{code:java}
    // Check the state of the penultimate block. It should be completed
    // before attempting to complete the last one.
    if (!fsn.checkFileProgress(src, pendingFile, false)) {
      return false;
    }
{code}
Solutions

1 Removing the PauseIBR .
 2 Decreasing the Size to be within one block.
 3 Trigger Block Report After hflush before lease recovery.

For me preferably No. 1 :)

> TestLeaseRecovery2#testCloseWhileRecoverLease fails intermittently in trunk
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-14004
>                 URL: https://issues.apache.org/jira/browse/HDFS-14004
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>
> Reference
> https://builds.apache.org/job/hadoop-qbt-trunk-java8-linux-x86/930/testReport/junit/org.apache.hadoop.hdfs/TestLeaseRecovery2/testCloseWhileRecoverLease/



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to