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

sam rash commented on HDFS-1142:
--------------------------------

There's actually still one problem condition that can occur w/o the Namenode 
taking ownership of lease when it starts lease recovery:

1. Client A loses lease due to soft/hard limit at a block boundary
2. NN begins lease recovery and finalizes blocks
3. Client A gets new block, starts writing
4. NN closes the file and frees the lease
5. Client A can continue to write to blocks acquired w/o the lease
6. Client A has an error and the block is left as a blockBeingWritten in the 
datanode

results:
-clients cannot open the file in append since the last block has no locations
-last block shows up as a missing block
-lease recovery will never cleanup the last block since no lease exists

assigning the lease to the NN for recovery prevents step 3 above and can stop 
this



> Lease recovery doesn't reassign lease when triggered by append()
> ----------------------------------------------------------------
>
>                 Key: HDFS-1142
>                 URL: https://issues.apache.org/jira/browse/HDFS-1142
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.21.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: hdfs-1142.txt, hdfs-1142.txt
>
>
> If a soft lease has expired and another writer calls append(), it triggers 
> lease recovery but doesn't reassign the lease to a new owner. Therefore, the 
> old writer can continue to allocate new blocks, try to steal back the lease, 
> etc. This is for the testRecoveryOnBlockBoundary case of HDFS-1139

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to