ZanderXu commented on code in PR #4353:
URL: https://github.com/apache/hadoop/pull/4353#discussion_r961260605
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java:
##########
@@ -2350,6 +2350,9 @@ private void invalidate(String bpid, Block[] invalidBlks,
boolean async)
removing = volumeMap.remove(bpid, invalidBlks[i]);
addDeletingBlock(bpid, removing.getBlockId());
LOG.debug("Block file {} is to be deleted", removing.getBlockURI());
+ if (datanode.getMetrics() != null) {
Review Comment:
@ZanderXu Copy, sir.
> Another one, it is unnecessary to decide if datanode.getMetrics() is null
or not
We need it, because
`hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl` try to
invalidate some blocks with null metrics. Or maybe we can modify the UT.
> "Wish every PR could be merged without any issues reviewers feedback."
+1, and I will do my best to achieve it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]