[
https://issues.apache.org/jira/browse/HDFS-7496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14238806#comment-14238806
]
Colin Patrick McCabe commented on HDFS-7496:
--------------------------------------------
Eddy and I talked offline about fixing this issue by using
{{CloseableReferenceCount}}. We would increment the refcount whenever we used
the volumes. When removing the volumes, we'd close the refcount, preventing
further increments. The remove() call would loop (busy wait) until the
refcount reached 0.
This will prevent a lot of the scenarios we described, like someone removing
volume /foo/bar and then adding a new volume under that path, and having
"stale" operations from the first /foo/bar take effect on the new one
unintentionally. There are some other fixes we need in FsVolumeList... like
adding a block pool is racy now. Giving this JIRA to Eddy at his request.
> Fix FsVolume removal race conditions on the DataNode
> -----------------------------------------------------
>
> Key: HDFS-7496
> URL: https://issues.apache.org/jira/browse/HDFS-7496
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Colin Patrick McCabe
> Assignee: Lei (Eddy) Xu
>
> We discussed a few FsVolume removal race conditions on the DataNode in
> HDFS-7489. We should figure out a way to make removing an FsVolume safe.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)