[
https://issues.apache.org/jira/browse/HDFS-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085572#comment-13085572
]
Tsz Wo (Nicholas), SZE commented on HDFS-1257:
----------------------------------------------
Thanks for the update. Some comments on the new patch:
- In belongsToInvalidates(..), the call to invalidateSet.contains(block) is not
synchronized.
- In computeInvalidateWork(..), the call to recentInvalidateSets.size() is not
synchronized.
- In invalidateWorkForOneNode(..), two synchronized block should be combined.
Otherwise, the invalidateSet may be modified in-between.
- Is TestProtectedBlockManager reliable? It sometimes timed out in my machine.
It would be great if it can finish within 1 minute.
> Race condition on FSNamesystem#recentInvalidateSets 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
> Affects Versions: 0.23.0
> Reporter: Ramkumar Vadali
> Assignee: Eric Payne
> Fix For: 0.23.0
>
> Attachments: HDFS-1257.1.20110810.patch, HDFS-1257.2.20110812.patch,
> HDFS-1257.3.20110815.patch, 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira