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

Jing Zhao commented on HDFS-7387:
---------------------------------

Thanks for the fix, Brandon! The patch looks good to me. Some minors in the 
test:
# This line needs clean
{code}
+    //Mockito.when(fos.getPos()).thenReturn((long) 6);
{code}
# It will be helpful to have some javadoc in the test to explain what scenarios 
have been covered

+1 after addressing the comments.

> NFS may only do partial commit due to a race between COMMIT and write
> ---------------------------------------------------------------------
>
>                 Key: HDFS-7387
>                 URL: https://issues.apache.org/jira/browse/HDFS-7387
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: nfs
>    Affects Versions: 2.6.0
>            Reporter: Brandon Li
>            Assignee: Brandon Li
>            Priority: Critical
>         Attachments: HDFS-7387.001.patch
>
>
> The requested range may not be committed when the following happens:
> 1. the last pending write is removed from the queue to write to hdfs
> 2. a commit request arrives, NFS sees there is not pending write, and it will 
> do a sync
> 3. this sync request could flush only part of the last write to hdfs
> 4. if a file read happens immediately after the above steps, the user may not 
> see all the data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to