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

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

                Author: ASF GitHub Bot
            Created on: 26/Jan/22 08:38
            Start Date: 26/Jan/22 08:38
    Worklog Time Spent: 10m 
      Work Description: tomscut commented on pull request #3888:
URL: https://github.com/apache/hadoop/pull/3888#issuecomment-1021978995


   > @tomscut IMHO, adding unit tests and assertions would be better than 
logging all variables to prevent inconsistent conditions between variables. For 
example, I suggest adding the following Preconditions to avoid inconsistencies 
between `candidates` and `replicasToDelete`.
   > 
   > ```java
   > Preconditions.checkArgument(candidates.containsAll(replicasToDelete));
   > ```
   > 
   > I still agree with adding more EC debug logs for not only developers but 
also non-developers. I prefer more descriptive logging rather than using 
variable names directly. And I think `targetIndex`, `found`, and `duplicated` 
should be omitted as they can be speculated from `storage2index`. (As I 
mentioned, we may want to add assertions or unit tests if they can be 
inconsistent.)
   > 
   > ```java
   > LOG.debug("Choose redundant EC replicas to delete from blk_{} which is 
located in {}", sblk.getBlockId(), storage2index);
   > LOG.debug("Storages with candidate blocks to be deleted: {}", candidates);
   > LOG.debug("Storages with blocks to be deleted: {}", replicasToDelete);
   > ```
   
   Thanks @tasanuma for your advice, it makes sense to me. 
   
   I updated it. Please take a look. Thank you.


-- 
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]


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

    Worklog Id:     (was: 715523)
    Time Spent: 2h 10m  (was: 2h)

> Add debug log for BlockManager#chooseExcessRedundancyStriped
> ------------------------------------------------------------
>
>                 Key: HDFS-16427
>                 URL: https://issues.apache.org/jira/browse/HDFS-16427
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: erasure-coding
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> To solve this issue 
> [HDFS-16420|https://issues.apache.org/jira/browse/HDFS-16420] , we added some 
> debug logs, which were also necessary.  If there are other problems, we set 
> the log level to DEBUG, which is convenient to analyze it.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to