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

John Zhuge commented on HDFS-10620:
-----------------------------------

Hi [~ajisakaa], when you merged the fix to branch-2 and branch-2.8, you 
misplaced "&&" with "&":
{code}
  private void addToInvalidates(Block b) {
...
    if (datanodes != null & datanodes.length() != 0) {
      blockLog.debug("BLOCK* addToInvalidates: {} {}", b, datanodes);
    }
  }
{code}
This resulted in {{TestFailoverWithBlockTokensEnabled}} test failures.

> StringBuilder created and appended even if logging is disabled
> --------------------------------------------------------------
>
>                 Key: HDFS-10620
>                 URL: https://issues.apache.org/jira/browse/HDFS-10620
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.6.4
>            Reporter: Staffan Friberg
>            Assignee: Staffan Friberg
>             Fix For: 2.8.0, 3.0.0-alpha2
>
>         Attachments: HDFS-10620.001.patch, HDFS-10620.002.patch
>
>
> In BlockManager.addToInvalidates the StringBuilder is appended to during the 
> delete even if logging isn't active.
> Could avoid allocating the StringBuilder as well, but not sure if it is 
> really worth it to add null handling in the code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to