[ https://issues.apache.org/jira/browse/HDFS-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089683#comment-13089683 ]
Todd Lipcon commented on HDFS-1108: ----------------------------------- bq. This should be similar to how we treat setTime(). Please don't add logSync on every addBlock(). The difference is that, if we miss a setTime() call, the worst thing that happens is that on failover, one of the files has an out-of-date access time. This is not a dataloss. If we miss a persistBlocks(), on failover we will lose data. This is dataloss, and unacceptable. How do you propose to avoid this dataloss? Or are you suggesting that dataloss on failover is acceptable? > Log newly allocated blocks > -------------------------- > > Key: HDFS-1108 > URL: https://issues.apache.org/jira/browse/HDFS-1108 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: name-node > Reporter: dhruba borthakur > Assignee: Todd Lipcon > Fix For: HA branch (HDFS-1623) > > Attachments: HDFS-1108.patch, hdfs-1108-habranch.txt, hdfs-1108.txt > > > The current HDFS design says that newly allocated blocks for a file are not > persisted in the NN transaction log when the block is allocated. Instead, a > hflush() or a close() on the file persists the blocks into the transaction > log. It would be nice if we can immediately persist newly allocated blocks > (as soon as they are allocated) for specific files. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira