hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-1257) Race condition introduced by HADOOP-5124
Date Thu, 24 Jun 2010 18:06:50 GMT

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

Scott Carey commented on HDFS-1257:
-----------------------------------

Is ConcurrentHashMap an option here?  It is significantly more efficient than Collections.synchronizedMap().


I believe ConcurrentModificationException can happen if a put() on a key happens at the same
time as a get() with the normal HashMap.  Furthermore, if a put() or other operation causes
the map to re-size, and there is a get() concurrently in progress, it can lead to the get
ending up in an infinite loop.  I've seen that one many times.  ConcurrentHashMap doesn't
have that issue.

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


Mime
View raw message