hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-1257) Race condition introduced by HADOOP-5124
Date Thu, 05 Aug 2010 23:13:16 GMT

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

Konstantin Shvachko commented on HDFS-1257:

This doesn't solve the problem in general. We should make sure that access to {{blockManager}}
methods is protected by {{FSNamesystem}} lock on the {{FSNamesystem}} level. Particularly
in this example {{BlockManager.computeInvalidateWork()}} is called by {{FSNamesystem.computeDatanodeWork()}},
which correctly updates metrics in BlockManager under {{FSNamesystem}} lock, but calls to
{{computeReplicationWork()}} and {{computeInvalidateWork()}} are done outside of the lock.

> Race condition introduced by HADOOP-5124
> ----------------------------------------
>                 Key: HDFS-1257
>                 URL: https://issues.apache.org/jira/browse/HDFS-1257
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>            Reporter: Ramkumar Vadali
>         Attachments: HDFS-1257.patch
> HADOOP-5124 provided some improvements to FSNamesystem#recentInvalidateSets. But it introduced
unprotected access to the data structure recentInvalidateSets. Specifically, FSNamesystem.computeInvalidateWork
accesses recentInvalidateSets without read-lock protection. If there is concurrent activity
(like reducing replication on a file) that adds to recentInvalidateSets, the name-node crashes
with a ConcurrentModificationException.

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

View raw message