[ 
https://issues.apache.org/jira/browse/HADOOP-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494603
 ] 

Hairong Kuang commented on HADOOP-1205:
---------------------------------------

I did not realize that blocksMap is protected by a global lock. I do not think 
that this is a good approach to ensure a structure integrity by acquiring a 
global lock. But anyway I can change my patch to acquire a global lock. But 
there are some non-public methods in FSNamesystem that do not acquire a global 
lock but access blocksMap. Shall we fix them?

> The open method of FSNamesystem should be synchronized
> ------------------------------------------------------
>
>                 Key: HADOOP-1205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1205
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.2
>            Reporter: Hairong Kuang
>            Priority: Blocker
>             Fix For: 0.13.0
>
>         Attachments: open.patch
>
>
> Method open accesses a shared data structure blockMap. If synchronization 
> access is not enforced, open might return inconsistent results.

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