Hexiaoqiao commented on code in PR #8529:
URL: https://github.com/apache/hadoop/pull/8529#discussion_r3510521252
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingDataNodeMessages.java:
##########
@@ -109,7 +109,7 @@ void enqueueReportedBlock(DatanodeStorageInfo storageInfo,
Block block,
}
void removeQueuedBlock(DatanodeStorageInfo storageInfo, Block block) {
- if (storageInfo == null || block == null) {
+ if (count == 0 || storageInfo == null || block == null) {
Review Comment:
Great catch, `count <= 0` may be safer because there is no logic to void
`count` under 0 when run subtract. Thanks.
--
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]