You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/02/16 11:43:00 UTC

[jira] [Updated] (HDDS-6331) Remove toString in debug log parameters within SCMCommonPlacementPolicy

     [ https://issues.apache.org/jira/browse/HDDS-6331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HDDS-6331:
---------------------------------
    Labels: pull-request-available  (was: )

> Remove toString in debug log parameters within SCMCommonPlacementPolicy
> -----------------------------------------------------------------------
>
>                 Key: HDDS-6331
>                 URL: https://issues.apache.org/jira/browse/HDDS-6331
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: SCM
>            Reporter: Stephen O'Donnell
>            Assignee: Stephen O'Donnell
>            Priority: Major
>              Labels: pull-request-available
>
> The debug log has "toString()" called on datanode details, which means it must be evaluated before it gets passed into the debug logger. That means this string will always get created even when the log messages is not emitted.
> {code:java}
> LOG.debug("Datanode {} is chosen. Required metadata size is {} and " +
>         "required data size is {}",
>     datanodeDetails.toString(), metadataSizeRequired, dataSizeRequired); {code}
> We can just drop the toString part to fix this.



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

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