[ https://issues.apache.org/jira/browse/HDFS-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13668497#comment-13668497 ]
Colin Patrick McCabe commented on HDFS-4849: -------------------------------------------- [~tlipcon] wrote: bq. Without per-file leases, a second thread trying to create a file already being created would end up getting back the same block ID and causing some havoc. One solution to this would be to include a nonce in the create() call, and store that in the INodeFileUnderConstruction, so that if you retry with the same nonce, it would identify it correctly as a retry. If leases are done by inode ID rather than by path, this problem goes away. I don't think delete can be made idempotent without changing the semantics in a major way. At that point, it would be impossible to do things like have FSShell tell you whether your rm actually deleted anything, etc. This isn't to mention things like concat... > Idempotent create, append and delete operations. > ------------------------------------------------ > > Key: HDFS-4849 > URL: https://issues.apache.org/jira/browse/HDFS-4849 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 2.0.4-alpha > Reporter: Konstantin Shvachko > Assignee: Konstantin Shvachko > > create, append and delete operations can be made idempotent. This will reduce > chances for a job or other app failures when NN fails over. -- 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