fengnanli commented on a change in pull request #2388:
URL: https://github.com/apache/hadoop/pull/2388#discussion_r506070581
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
##########
@@ -3512,7 +3512,11 @@ private Block addStoredBlock(final BlockInfo block,
int numUsableReplicas = num.liveReplicas() +
num.decommissioning() + num.liveEnteringMaintenanceReplicas();
- if(storedBlock.getBlockUCState() == BlockUCState.COMMITTED &&
+
+ // if block is still under construction, then done for now
+ if (!storedBlock.isCompleteOrCommitted()) {
Review comment:
I felt quite confused with the original structure since the early return
was put after the statements it is trying to avoid..
I can make it a single return no big deal.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]