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

Konstantin Shvachko commented on HDFS-4308:
-------------------------------------------

Right, {{dir.removeBlock()}} is called only in two places in both cases 
followed by {{persistBlock()}}, so there is no need to journal in 
{{removeBlock()}}. The patch fixes the problem. 
I think we can also make {{removeBlock()}} void rather returning boolean, since 
it always returns true and nobody checks it.
                
> addBlock() should persist file blocks once
> ------------------------------------------
>
>                 Key: HDFS-4308
>                 URL: https://issues.apache.org/jira/browse/HDFS-4308
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.0.3-alpha
>            Reporter: Konstantin Shvachko
>            Assignee: Plamen Jeliazkov
>             Fix For: 2.0.3-alpha
>
>         Attachments: HDFS-4308.patch
>
>
> FSNamesystem.getAdditionalBlock() persists all file blocks twice, first in 
> {{dir.removeBlock()}} using OP_ADD, then immediately after that in 
> {{dir.persistBlocks()}} using OP_UPDATE_BLOCKS.
> This should be aggregated in one call to logEdit().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to