[ https://issues.apache.org/jira/browse/HDFS-6757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14083232#comment-14083232 ]
Colin Patrick McCabe commented on HDFS-6757: -------------------------------------------- [~daryn]: you make an interesting point about OP_CLOSE. Should successfully replaying OP_CLOSE require that a corresponding lease be found? It hasn't in the past. This seems related to your other point about using references rather than inode IDs in the lease manager. If OP_CLOSE absolutely, positively has to remove those leases, then I'd be more OK with using references there. In other words, the LeaseManager has always been somewhat arms-length from the namesystem, but you are proposing to integrate them more closely. bq. I thought the close fails if the lease is expired? If yes, my question is whether replaying edit logs should tolerate a close with no lease if the live NN does not allow it. Not exactly. See HDFS-3031. {{FSNamesystem#completeFile}} is actually an idempotent RPC that can succeed as many times as you like... under the right conditions. No lease required. In general nobody is very happy with how we handle errors closing files (see HDFS-4504 for details). It's still a bit unclear what the solution is. I guess perhaps we could say that OP_CLOSE is reserved for normal, clean file close operations, and lease expirations or reassignments get different ops. I have to think about whether we would ever want to do a "dirty" close via OP_CLOSE... I can't think of any scenario off the top of my head, but maybe you guys can? > Simplify lease manager with INodeID > ----------------------------------- > > Key: HDFS-6757 > URL: https://issues.apache.org/jira/browse/HDFS-6757 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Haohui Mai > Assignee: Haohui Mai > Attachments: HDFS-6757.000.patch, HDFS-6757.001.patch, > HDFS-6757.002.patch, HDFS-6757.003.patch, HDFS-6757.004.patch > > > Currently the lease manager records leases based on path instead of inode > ids. Therefore, the lease manager needs to carefully keep track of the path > of active leases during renames and deletes. This can be a non-trivial task. > This jira proposes to simplify the logic by tracking leases using inodeids > instead of paths. -- This message was sent by Atlassian JIRA (v6.2#6252)