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 2021/06/29 16:12:00 UTC

[jira] [Updated] (HDDS-5398) Avoid object creation in ReplicationManger debug log statements

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

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

> Avoid object creation in ReplicationManger debug log statements
> ---------------------------------------------------------------
>
>                 Key: HDDS-5398
>                 URL: https://issues.apache.org/jira/browse/HDDS-5398
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: SCM
>    Affects Versions: 1.1.0
>            Reporter: Stephen O'Donnell
>            Assignee: Stephen O'Donnell
>            Priority: Major
>              Labels: pull-request-available
>
> There are a few debug log entries in replication manager like this:
> {code}
>     LOG.debug("Handling under-replicated container: {}",
>         container.getContainerID());
>       LOG.debug("Deleting empty container {} replicas,", container.containerID());
> {code}
> Especially the latter one, will always allocate a new ContainerID object on each call, even if debug is not enabled.
> If we just pass "container" then it will use the container.toString() method inside the logger, only if debug is enabled. The ContainerInfo toString looks like:
> {code}
>   @Override
>   public String toString() {
>     return "ContainerInfo{"
>         + "id=" + containerID
>         + ", state=" + state
>         + ", pipelineID=" + pipelineID
>         + ", stateEnterTime=" + stateEnterTime
>         + ", owner=" + owner
>         + '}';
>   }
> {code}
> It contains some extra information, but some of that may be useful if debugging a problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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