You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/03/22 03:55:00 UTC

[jira] [Commented] (HDFS-16962) The blockReport RPC should not update the lastBlockReportTime if this blockReport is ignored

    [ https://issues.apache.org/jira/browse/HDFS-16962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703469#comment-17703469 ] 

ASF GitHub Bot commented on HDFS-16962:
---------------------------------------

ZanderXu opened a new pull request, #5501:
URL: https://github.com/apache/hadoop/pull/5501

   The blockReport RPC should not update the lastBlockReportTime if this blockReport is ignored. the related code as bellows:
   
   ```
   public DatanodeCommand blockReport(final DatanodeRegistration nodeReg,
         String poolId, final StorageBlockReport[] reports,
         final BlockReportContext context) throws IOException {
     // code placeholder
     ...
     try {
       // this blockReport may be ignored if bm.checkBlockReportLease return false
       if (bm.checkBlockReportLease(context, nodeReg)) {
         // code placeholder
         ...
       } 
     }
     // If this blockReport is ignored, the removeBRLeaseIfNeeded should not update the lastBlockReportTime
     bm.removeBRLeaseIfNeeded(nodeReg, context);
   
     // code placeholder
     ...
   
     return null;
   } 
   ```




> The blockReport RPC should not update the lastBlockReportTime if this blockReport is ignored
> --------------------------------------------------------------------------------------------
>
>                 Key: HDFS-16962
>                 URL: https://issues.apache.org/jira/browse/HDFS-16962
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>
> The blockReport RPC should not update the lastBlockReportTime if this blockReport is ignored. the related code as bellows:
> {code:java}
> public DatanodeCommand blockReport(final DatanodeRegistration nodeReg,
>       String poolId, final StorageBlockReport[] reports,
>       final BlockReportContext context) throws IOException {
>   // code placeholder
>   ...
>   try {
>     // this blockReport may be ignored if bm.checkBlockReportLease return false
>     if (bm.checkBlockReportLease(context, nodeReg)) {
>       // code placeholder
>       ...
>     } 
>   }
>   // If this blockReport is ignored, the removeBRLeaseIfNeeded should not update the lastBlockReportTime
>   bm.removeBRLeaseIfNeeded(nodeReg, context);
>   // code placeholder
>   ...
>   return null;
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org