[ https://issues.apache.org/jira/browse/HDFS-4258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13572854#comment-13572854 ]
Suresh Srinivas commented on HDFS-4258: --------------------------------------- bq. I say this mostly because it seems this JIRA has already concluded that the appropriate thing to do is to error out if a file which is actively being written is renamed Where? bq. It may well be that introducing a unique INode ID as has been described here is a good architectural change, but I suspect it's not actually necessary to address the bug described by this JIRA. Is the concern you are expressing that InodeID introduction is not a part of this jira? I fail to understand the concern you have. As Brandon has earlier commented, InodeID has been added and related changes are being made. I also think HDFS-4434 is some thing that we may consider doing in the future with a switch to turn it off for folks who do not want the memory impact. > Rename of Being Written Files > ----------------------------- > > Key: HDFS-4258 > URL: https://issues.apache.org/jira/browse/HDFS-4258 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs-client, namenode > Affects Versions: 3.0.0 > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Brandon Li > Attachments: HDFS-4258.patch, HDFS-4258.patch, HDFS-4258.patch, > HDFS-4258.patch > > > When a being written file or it's ancestor directories is renamed, the path > in the file lease is also renamed. Then the writer of the file usually will > fail since the file path in the writer is not updated. > Moreover, I think there is a bug as follow: > # Client writes 0's to F_0="/foo/file" and writes 1's to F_1="/bar/file" at > the same time. > # Rename /bar to /baz > # Rename /foo to /bar > Then, writing to F_0 will fail since /foo/file does not exist anymore but > writing to F_1 may succeed since /bar/file exits as a different file. In > such case, the content of /bar/file could be partly 0's and partly 1's. -- 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