Tre2878 commented on PR #5855:
URL: https://github.com/apache/hadoop/pull/5855#issuecomment-1661545892

   > > Two of the cases will come into this logic
   > > 
   > > 1. The namenode is restarting while receiving FBRS from all datanodes 
and is in safe mode
   > > 2. When the namenode is in secure mode for some reason while it has been 
running for a long time
   > >    In the first case, if the datanode has a failed disk, the datanode 
will send the FBR for the normal disk and the namenode will handle it normally
   > >    In the second case, blockReportCount == 0 will always be false if no 
new disks are added to the datanode
   > >    So I recommend keeping the code as it is and not using 
blockReportCount == 0
   > 
   > @Tre2878 If a disk is failed, its' state will be set to `FAILED` and it 
will be removed from `storageMap`. So the check of `blockReportCount` will not 
involve failed storages, and `blockReportCount == 0` is not always be false. 
Thus, I think my plan can work here. What's your opinion?
   You're talking about the first case I mentioned, which is fine,
   The problem is the second case, where the namenode is not restarted, but the 
namenode is in safe mode for some reason, and this logic will also be executed, 
and since this is not the first FBR, blockReportCount will always be greater 
than 0
   


-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to