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

Konstantin Shvachko commented on HDFS-12856:
--------------------------------------------

This to address [~xkrogen]'s 
[comment|https://issues.apache.org/jira/browse/HDFS-12832?focusedCommentId=16259458&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16259458]
 in HDFS-12832.
I see two possible solutions:
# Surround the call with the lock
# Reorganize {{BlockReconstructionWork}} so that it stored only elementary 
fields, like ids, to allow more fine-grained locking inside {{chooseTargets()}}

We should also deprecate {{BlockPlacementPolicy.chooseTargets()}} methods with 
{{srcPath}} parameter, since it is unused in all known (to me) variants of the 
policy.

> BlockReconstructionWork.chooseTargets() violates namesystem locking
> -------------------------------------------------------------------
>
>                 Key: HDFS-12856
>                 URL: https://issues.apache.org/jira/browse/HDFS-12856
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.7.4
>            Reporter: Konstantin Shvachko
>
> {{BlockReconstructionWork.chooseTargets()}} is called outside namesystem 
> lock, although it works with {{DatanodeDescriptor}} and 
> {{DatanodeStorageInfo}}, which can change.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to