[ https://issues.apache.org/jira/browse/HBASE-23047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wellington Chevreuil updated HBASE-23047: ----------------------------------------- Status: Patch Available (was: Open) > 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 > Priority: Minor > Attachments: HBASE-23047.master.001.patch > > > 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)