[ 
https://issues.apache.org/jira/browse/HDFS-7496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lei (Eddy) Xu updated HDFS-7496:
--------------------------------
    Attachment: HDFS-7496.000.patch

Thanks for the suggestions [~cmccabe].

In this patch, I made the following changes:

# Add {{FsVolumeImpl#reference}}, {{FsVolumeImpl#unreference}} and 
{{FsVolumeImpl#closeAndWait()}} to manage the liveness of a {{FsVolumeImpl}} 
instance. 
# After calling {{closeAndWait()}}, all future {{reference()}}s on the same 
{{FsVolumeImpl}} will throw IOException. 
# The functions that get stats on the {{FsVolume}} return 0 after close, e.g., 
{{getAverage()}}.
# The functions that requires IOs return {{IOException}}, e.g., {{checkDirs()}} 
and {{getVolumeMap()}}. 
# Since {{FsVolumeList#getNextVolume()}} exploits  {{FsVolume}} to other 
threads, we let {{BlockReceiver}} manages the reference of a volume that it is 
actively writing.

> 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
>         Attachments: HDFS-7496.000.patch
>
>
> 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)

Reply via email to