Wellington Chevreuil created HBASE-23047:
--------------------------------------------

             Summary: ChecksumUtil.validateChecksum logs an INFO message inside 
a "if(LOG.isTraceEnabled())" block.
                 Key: HBASE-23047
                 URL: https://issues.apache.org/jira/browse/HBASE-23047
             Project: HBase
          Issue Type: Improvement
    Affects Versions: 2.1.6, 2.2.1, 3.0.0, 2.3.0
            Reporter: Wellington Chevreuil
            Assignee: Wellington Chevreuil


Noticed this while analysing another potential checksum issue. Despite doing a 
check for TRACE level, we log an INFO message inside the if block:
{noformat}
if (LOG.isTraceEnabled()) {
      LOG.info("dataLength=" + buf.capacity() + ", sizeWithHeader=" + 
onDiskDataSizeWithHeader
          + ", checksumType=" + ctype.getName() + ", file=" + pathName + ", 
offset=" + offset
          + ", headerSize=" + hdrSize + ", bytesPerChecksum=" + 
bytesPerChecksum);
    }
{noformat}

Uploading a patch that logs a TRACE message and switch to parameterising 
logging. Since there's no extra computation on the param passing, we shouldn't 
need the extra if either.





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

Reply via email to