[ 
https://issues.apache.org/jira/browse/HDFS-16593?focusedWorklogId=774333&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-774333
 ]

ASF GitHub Bot logged work on HDFS-16593:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/May/22 02:55
            Start Date: 25/May/22 02:55
    Worklog Time Spent: 10m 
      Work Description: ZanderXu opened a new pull request, #4353:
URL: https://github.com/apache/hadoop/pull/4353

   Correct inaccurate BlocksRemoved metric on DataNode side




Issue Time Tracking
-------------------

            Worklog Id:     (was: 774333)
    Remaining Estimate: 0h
            Time Spent: 10m

> Correct inaccurate BlocksRemoved metric on DataNode side
> --------------------------------------------------------
>
>                 Key: HDFS-16593
>                 URL: https://issues.apache.org/jira/browse/HDFS-16593
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When tracing the root cause of production issue, I found that the 
> BlocksRemoved  metric on Datanode size was inaccurate.
> {code:java}
> case DatanodeProtocol.DNA_INVALIDATE:
>       //
>       // Some local block(s) are obsolete and can be 
>       // safely garbage-collected.
>       //
>       Block toDelete[] = bcmd.getBlocks();
>       try {
>         // using global fsdataset
>         dn.getFSDataset().invalidate(bcmd.getBlockPoolId(), toDelete);
>       } catch(IOException e) {
>         // Exceptions caught here are not expected to be disk-related.
>         throw e;
>       }
>       dn.metrics.incrBlocksRemoved(toDelete.length);
>       break;
> {code}
> Because even if the invalidate method throws an exception, some blocks may 
> have been successfully deleted internally.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to