[
https://issues.apache.org/jira/browse/HDFS-6877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14179051#comment-14179051
]
Colin Patrick McCabe commented on HDFS-6877:
--------------------------------------------
{code}
1231 try {
1232 finalizeBlock(startTime);
1233 } catch (ReplicaNotFoundException e) {
1234 // ReplicaInfo has been removed due to the corresponding
data
1235 // volume has been removed. Don't need to check disk
error.
1236 LOG.info(myString + ": BlockReceiver is interrupted
because the" +
1237 " volume is removed.", e);
1238 sendAckUpstream(ack, expected, totalAckTimeNanos, 0,
1239 Status.OOB_INTERRUPTED);
1240 running = false;
1241 receiverThread.interrupt();
1242 continue;
1243 }
{code}
I think we need to actually check that the volume was removed. All the
exception tells us is that the replica info wasn't found. Although this may be
adequate for now, it seems fragile to depend on this. This would also make me
feel better about logging a message saying that the volume was removed (and we
could include the volume name).
> Avoid calling checkDisk when an HDFS volume is removed during a write.
> ----------------------------------------------------------------------
>
> Key: HDFS-6877
> URL: https://issues.apache.org/jira/browse/HDFS-6877
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode
> Affects Versions: 2.5.0
> Reporter: Lei (Eddy) Xu
> Assignee: Lei (Eddy) Xu
> Attachments: HDFS-6877.000.consolidate.txt,
> HDFS-6877.000.delta-HDFS-6727.txt, HDFS-6877.001.combo.txt,
> HDFS-6877.001.patch, HDFS-6877.002.patch, HDFS-6877.003.patch,
> HDFS-6877.004.patch, HDFS-6877.005.patch, HDFS-6877.006.patch
>
>
> Avoid calling checkDisk and stop active BlockReceiver thread when an HDFS
> volume is removed during a write.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)