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

Daryn Sharp commented on HDFS-6757:
-----------------------------------

bq. Should successfully replaying OP_CLOSE require that a corresponding lease 
be found? It hasn't in the past. [...] I guess perhaps we could say that 
OP_CLOSE is reserved for normal, clean file close operations

As best I can tell we do currently require a lease to close and an edit op is 
generated only for clean closes.  completeFileInternal throws if there is no 
lease but special logic for rpc retries will discard the lease exception and 
return success if the client is closing the last block with its current 
genstamp.  However, no edit is generated so it's not a consideration here.

A close op may also be generated by commit block sync, but it looks like the NN 
should have already reassigned the lease to itself during block recovery.  I 
believe the design is a UC file must always have a lease of a client or the NN.

The general concern is whether it's prudent to start masking possible bugs 
during edit replay.  It makes me very uncomfortable.  I'd rather the NN fail 
while processing illegal edit sequences because edit bugs can lead to data 
loss.  Otherwise we are implicitly willing to let the standby silently become 
inconsistent with the active.

> 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)

Reply via email to