[
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.003.patch
Hi, [~cmccabe] Thanks for the reviews.
The original purpose of embedding {{FsVolumeReference}} in
{{ReplicaInPipeline}} is that the volume obtained reference in
{{FsVolumeList#getNextVolume}} and it needs to pass this reference object to
{{BlockReceiver}}.
In this updated patch , I added a new class
{{ReplicaInPipelineWithVolumeReference}} to pass the the reference object with
the {{replicaInfo}}.
{code}
public class ReplicaInPipelineWithVolumeReference {
private final ReplicaInPipelineInterface replica;
private final FsVolumeReference volumeReference;
{code}
So that {{BlockReceiver}} can claim the ownership of volume reference object,
while the size of {{replicaInfo}} is not changed.
bq. We don't want to keep volumes from being removed just because a ReplicaInfo
exists somewhere in memory.
It should not happen, because in {{FsDatasetImpl#removeVolumes}}, after
removing volumes, the replicaInfo on these volumes are also removed.
bq. I think ReplicaInfo objects should just contain the unique storageID of a
volume.
{{ReplicaInfo}} already has a pointer {{ReplicaInfo#volume}} pointing to the
volume object. Also, {{ReplicaInfo}} should be cleaned if the volume is
removed. So it might not need to hold a {{storageId}}.
Could you take another look?
> 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, HDFS-7496.001.patch,
> HDFS-7496.002.patch, HDFS-7496.003.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)