[
https://issues.apache.org/jira/browse/HDFS-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lei (Eddy) Xu resolved HDFS-8860.
---------------------------------
Resolution: Fixed
I had a discussion with [~cmccabe] offline and learned that
{{ReplicaInfo#unlinkBlock}} was designed to append workload before HDFS-1700.
It was not designed to remove the hardlinks created by {{DN}} upgrade.
Since the code of creating hardlinks when appending a file is gone, the patch
is still valid to remove dead code.
> Remove unused Replica copyOnWrite code
> --------------------------------------
>
> Key: HDFS-8860
> URL: https://issues.apache.org/jira/browse/HDFS-8860
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 3.0.0, 2.8.0
> Reporter: Lei (Eddy) Xu
> Assignee: Lei (Eddy) Xu
> Fix For: 2.8.0
>
> Attachments: HDFS-8860.0.patch
>
>
> {{ReplicaInfo#unlinkBlock()}} is effectively disabled by the following code,
> because {{isUnlinked()}} always returns true.
> {code}
> if (isUnlinked()) {
> return false;
> }
> {code}
> Several test cases, e.g., {{TestFileAppend#testCopyOnWrite}} and
> {{TestDatanodeRestart#testRecoverReplicas}} are testing against the unlink
> Lets remove the relevant code to eliminate the confusions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)