hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-4972) FSNamesystem.countNodes(Block b) should be synchronized.
Date Wed, 07 Jan 2009 19:10:44 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-4972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661664#action_12661664
] 

Konstantin Shvachko commented on HADOOP-4972:
---------------------------------------------

I checked the trunk - all calls to {{FSNamesystem.countNodes()}} are done under the FSNamesystem
lock.
Could you please check earlier versions. If it is not synchronized in them we should fix it
there, if not the issue can be closed.

> FSNamesystem.countNodes(Block b) should be synchronized.
> --------------------------------------------------------
>
>                 Key: HADOOP-4972
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4972
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> (Copied a [comment|https://issues.apache.org/jira/browse/HADOOP-4840?focusedCommentId=12657242#action_12657242]
from HADOOP-4840.)
> FSNamesystem.countNodes(..) is called in many places including:
>     * FSNamesystem.addStoredBlock(Block, DatanodeDescriptor, DatanodeDescriptor)
>     * FSNamesystem.checkReplicationFactor(INodeFile)
>     * FSNamesystem.decrementSafeBlockCount(Block)
>     * FSNamesystem.getBlockLocationsInternal(String, INodeFile, long, long, int, boolean)
>     * FSNamesystem.invalidateBlock(Block, DatanodeInfo)
>     * FSNamesystem.isReplicationInProgress(DatanodeDescriptor)
>     * FSNamesystem.markBlockAsCorrupt(Block, DatanodeInfo)
>     * FSNamesystem.processMisReplicatedBlocks()
>     * FSNamesystem.processPendingReplications()
>     * FSNamesystem.updateNeededReplications(Block, int, int)
> However, some of them, e.g. getBlockLocationsInternal, call countNodes(..) without owning
the fsnamesystem lock before calling . It may causes NPE in runtime.

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


Mime
View raw message