[
https://issues.apache.org/jira/browse/HDFS-7719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301774#comment-14301774
]
Colin Patrick McCabe commented on HDFS-7719:
--------------------------------------------
The solution here seems to be to treat the removed paths as prefixes, and
remove any volume that has these paths as a prefix. But with this patch, can't
someone just do "remove /" and remove everything? Do we really want to allow
that?
It seems like we should be able to convert between a "volume-level" and
{{BlockPoolSliceStorage}} directory directly, rather than doing this prefix
thing.
{code}
void removeVolumes(Set<File> storageDirs) {
{code}
Can you change this parameter to be something like "toRemove"? I am having a
really hard time reading this function since every variable seems to be named
similarly: "storageDir", "sd", "storageDirs", etc.
> BlockPoolSliceStorage could not remove storageDir.
> --------------------------------------------------
>
> Key: HDFS-7719
> URL: https://issues.apache.org/jira/browse/HDFS-7719
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.6.0
> Reporter: Lei (Eddy) Xu
> Assignee: Lei (Eddy) Xu
> Attachments: HDFS-7719.000.patch, HDFS-7719.001.patch
>
>
> The parameter of {{BlockPoolSliceStorage#removeVolumes()}} is a set of volume
> level directories, thus {{BlockPoolSliceStorage}} could not directly compare
> its own {{StorageDirs}} with this volume-level directory. The result of that
> is {{BlockPoolSliceStorage}} did not actually remove the targeted
> {{StorageDirectory}}.
> It will cause failure when remove a volume and then immediately add a volume
> back with the same mount point..
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)