[
https://issues.apache.org/jira/browse/HDFS-9298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14971648#comment-14971648
]
Jing Zhao commented on HDFS-9298:
---------------------------------
Thanks for working on this, Chang. Some comments on the patch:
# In {{setGenerationStampAndVerifyReplicas}}, {{staleReplicas}} is just a
temporary list holding all the stale replicas. Thus updating this list seems
unnecessary.
# A UC replica reported by DN with GS greater than the one recoded in NN may be
valid. This is because the original writing may fail before the file gets
closed and a writing pipeline recovery may still be in progress. Thus some DN
may have bumped the GS while that GS has not been persisted in the NN yet (see
{{DataStreamer#setupPipelineInternal}}). If those DataNodes restart, these
un-finalized replicas will still be reported to NN. Later when recovering the
block, actually these replicas will still be used as valid replicas (see
{{DataNode#recoverBlock}}).
> remove replica and not add replica with wrong genStamp
> ------------------------------------------------------
>
> Key: HDFS-9298
> URL: https://issues.apache.org/jira/browse/HDFS-9298
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Chang Li
> Assignee: Chang Li
> Attachments: HDFS-9298.1.patch
>
>
> currently, in setGenerationStampAndVerifyReplicas, replica with wrong gen
> stamp is not really removed, only StorageLocation of that replica is removed.
> Moreover, we should check genStamp before addReplicaIfNotPresent
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)